Bug 27351 - Team plugins have too many listeners
Summary: Team plugins have too many listeners
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Michael Valenta CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2002-11-28 14:12 EST by John Arthorne CLA
Modified: 2002-12-13 16:18 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.