Just a short update on this issue…
After some additional analyses of the code I found the problem. We have a ResourceChangeListener that fires a LabelProviderChangedEvent containing the elements to be updated. After importing a project, all resources are treated as ADDED and this results in a decoration of all resources. When removing the elements array from the LabelProviderChangedEvent constructor and firing a generic event, this problem is solved, i.e. only visible elements are decorated.
I have proposed a change to fix this behavior while introducing a caching mechanism for decoration information: http://egit.eclipse.org/r/2360
Cheers,
Philipp
From: egit-dev-bounces@xxxxxxxxxxx [mailto:egit-dev-bounces@xxxxxxxxxxx] On Behalf Of Thun, Philipp
Sent: Freitag, 14. Januar 2011 16:21
To: (egit-dev@xxxxxxxxxxx)
Subject: [egit-dev] Git decorator - initial run when Eclipse starts up
Today I found an "issue" related to decorations in Eclipse: when creating a new Eclipse workspace and then importing a Git project, all resources are decorated once even though they are not visible. I tested this with a project/repository containing 15.000 files – this resulted in 15.000 invocations of GitLightweightDecorator.decorate().
Does anybody know if it is possible to exclude a specific decorator from this initial run triggered by Eclipse?
There might be other decorators that make use of this first run by persisting state information or so, but calling the Git decorator in this manner is complete waste – the actual decorations happen when a resource becomes visible in the package explorer.