Community
Participate
Working Groups
I have been spending time looking at the garbage created by various operations in Eclipse. One item in SWT that keeps showing up is Object[] allocations in org.eclipse.swt.widgets.Synchronizer.addLast. The pattern is, a long running operation is running in a non-UI thread, and continually posting progress updates to the UI thread. Since the UI thread isn't very busy, it processes these very fast, and the Synchronizer queue is often emptied. This means the "messages" array is continually being thrown away and recreated with each call to addLast and removeFirst. Consider keeping a small array allocated at all times, instead of throwing it away when empty. This can account for up to 5% of the garbage created during some typical operations in Eclipse. NOTES:
PRODUCT VERSION: 0.131
To be considered as part of a future SWT optimization pass.
Moving from Later.
Fixed > 20041008 The async queue is now reset only when it grows to be larger than 64 entries.