Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2018-06-06 15:30:11 -0400
committerMatthias Sohn2018-06-06 18:01:08 -0400
commit389215a8294229850d2392f4e66b32a32c66a573 (patch)
tree65e7d22ce9d3608afaf552ac4f6cbd29e6db1ac7 /org.eclipse.egit.ui/src/org/eclipse/egit/ui
parentf13dd8f793ef0772517f7eeb59f710f24a0210a7 (diff)
downloadegit-389215a8294229850d2392f4e66b32a32c66a573.tar.gz
egit-389215a8294229850d2392f4e66b32a32c66a573.tar.xz
egit-389215a8294229850d2392f4e66b32a32c66a573.zip
Use hash lookup for TreeViewers
This should speed up manipulating them when they contain thousands of elements. Bug: 535516 Change-Id: I106500fd09dea99e8553a07b1311beccee590491 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorOutlinePage.java1
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorOutlinePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorOutlinePage.java
index cb282cf4c..50a264f11 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorOutlinePage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorOutlinePage.java
@@ -65,6 +65,7 @@ public class DiffEditorOutlinePage extends NestedContentOutlinePage {
super.createControl(parent);
TreeViewer viewer = getTreeViewer();
viewer.setAutoExpandLevel(2);
+ viewer.setUseHashlookup(true);
viewer.setContentProvider(new DiffContentProvider());
viewer.setLabelProvider(new DiffLabelProvider());
viewer.addDoubleClickListener(
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java
index d57ffbe10..87b6f7cb7 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java
@@ -2039,6 +2039,7 @@ public class StagingView extends ViewPart
Tree tree = toolkit.createTree(composite, SWT.FULL_SELECTION
| SWT.MULTI);
TreeViewer treeViewer = new TreeViewer(tree);
+ treeViewer.setUseHashlookup(true);
return treeViewer;
}

Back to the top