[stagingView] Store IFile/IContainer for entries
commit01b99582089e0b4002ceff3ab951111cb65e73dc
authorRobin Stocker <robin@nibor.org>
Sun, 1 Dec 2013 19:16:35 +0000 (1 20:16 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 6 Feb 2014 00:24:22 +0000 (6 01:24 +0100)
tree0da2b731eae0b42923419738472c5138e7371d6a
parent8a48efb11cd5a89a301368409f864cee68a4359d
[stagingView] Store IFile/IContainer for entries

Instead of calculating the resource on each access, calculate them once
and store them in a field. With 4000 unstaged changes in a test
repository, this brought down the time to expand all elements from 3
seconds to 500-800 ms.

Maybe getting the resources could be made faster by not using
findFilesForLocationURI/findContainersForLocationURI, but instead going
through the projects of the repository and using getFile/getFolder and
only falling back to the above in case nothing is found.

Bug: 420825
Change-Id: I86f0e09fad54d63e7e76ae3541178ae80c867144
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingEntry.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingFolderEntry.java