Bug 27351

Summary: Team plugins have too many listeners
Product: [Eclipse Project] Platform Reporter: John Arthorne <john.arthorne>
Component: TeamAssignee: Michael Valenta <Michael.Valenta>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeffmcaffer
Version: 2.1Keywords: performance
Target Milestone: 2.1 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description John Arthorne CLA 2002-11-28 14:12:45 EST
Build 20021127

PRE_AUTO_BUILD and POST_AUTO_BUILD listeners have a non-trivial cost associated
with them, because we need to create a new tree layer to allow you to make
changes to the tree.  Of the five BUILD listeners that are typically running at
any given time, four of them from team/cvs.  Here are their class names:

pre build:

org.eclipse.team.internal.ccvs.core.util.SyncFileChangeListener
org.eclipse.team.internal.ccvs.core.util.ProjectDescriptionManager
org.eclipse.team.core.Team$2

post build:

org.eclipse.team.internal.ccvs.core.util.AddDeleteMoveListener


You should try to minimize use of these listeners.  Some ideas:

- POST_CHANGE listeners have trivial cost... switch to POST_CHANGE where possible
- two listeners cost more than one.  Try to create just one and delegate the
work from there.
- consider removing listeners when they are not applicable.  For example, if
there are no .vcm_meta files, you may be able to get rid of the listener for it.
Comment 1 Michael Valenta CLA 2002-12-12 07:17:28 EST
The decorator rework got ride of a few listeners and I combined a few others in 
CVS core. I think there's still one in team core that we may not need anymore.
Comment 2 Michael Valenta CLA 2002-12-13 16:18:26 EST
CVS now has one listener per delta cycle. The Team listener will be handled in 
bug 28300.