The problem shall be because of the following reasons.
- Not using of Event Dispatching Thread (EDT) properly for the events triggered from the operator.
- Usually event dispatching thread should not contain the long running operations.
- And unwanted usage of threads which leads to high CPU usage some times might leads to hang USM.
- Unused objects are not set for garbage collection.Which leads to high heap usage and throws OutofMemory exception.
- Unnecessary usage of Collection classes leads to heap memory occupation.
- Critical operations if not synchronized may lead to deadlock and resulting the Java UI to hang.
- And costly operation like Cell Renderer used for the JTables, which will be triggered to paint the GUI very frequently which takes the EDT thread. So that Java UI will hang most very often.
- And also when the NEs are dragged and dropped to the working view the getValueAt() method will be called for each cell of the JTable. So this again takes significant amount of time in painting the value at each cell of the JTable. So this leads to block the Java GUI.
Solutions:-
The problem can be solved by removing unwanted usage of Collection classes (Vector, Hashtable etc…) and avoiding usage of loops in the run method of threads which leads to high CPU usage.
0 Comments:
Post a Comment