More efficient label provider for the staging view
commitc874cca93dcd42ab675469b20774595a5b75ace7
authorThomas Wolf <thomas.wolf@paranor.ch>
Fri, 2 Sep 2016 21:23:53 +0000 (2 23:23 +0200)
committerThomas Wolf <thomas.wolf@paranor.ch>
Wed, 7 Sep 2016 06:55:40 +0000 (7 08:55 +0200)
tree07354196b7e7143e95cdda3834e02db3d2ef46da
parent2ba61eaa90f9a112a232698bdc3d5b3720cbce91
More efficient label provider for the staging view

The staging view's label provider was derived from
DecoratingLabelProvider, which is an ITreePathLabelProvider. For these,
the TreeViewer's WrappedViewerLabelProvider computes the tree path for
each element, which then ultimately isn't used because the
StagingViewLabelProvider is _not_ an ITreePathLabelProvider. This tree
path computation is, at least on GTK, fairly expensive.

By not deriving our label provider from DecoratingLabelProvider but
wrapping it, we can ensure that the framework does not compute these
tree paths that are then not used anyway, and decorations are
significantly faster on GTK.

Bug: 500106
Change-Id: If30bfbfeda6df2f89022995e8ba375be8c45ca3e
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java