Bug 4795 - Performance: Synchronizer queue creation (1GITDM2)
Summary: Performance: Synchronizer queue creation (1GITDM2)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-11 14:23 EDT by John Arthorne CLA
Modified: 2004-10-08 14:29 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2001-10-11 14:23:09 EDT
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:
Comment 1 DJ Houghton CLA 2001-10-29 16:39:06 EST
PRODUCT VERSION:

0.131

Comment 2 Mike Wilson CLA 2002-05-24 19:11:32 EDT
To be considered as part of a future SWT optimization pass.
Comment 3 Veronika Irvine CLA 2002-09-11 14:08:03 EDT
Moving from Later.
Comment 4 Steve Northover CLA 2004-10-08 14:29:01 EDT
Fixed > 20041008

The async queue is now reset only when it grows to be larger than 64 entries.