TMF: Fix performance issue in the filter dialog of the time graph view
authorMathieu Cote <mathieu.cote@polymtl.ca>
Thu, 12 Feb 2015 22:43:58 +0000 (17:43 -0500)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Fri, 13 Feb 2015 16:06:57 +0000 (11:06 -0500)
This patch improves the performance of opening the filter dialog
of the time graph view. The dialog can take many minutes to open
with traces that contain 10 000+ threads, because of an O(n²)
algorithm to associate threads with their parent. With this change,
it takes about 8 seconds to open the dialog.

Change-Id: Ib4f4c41583705041a3df9d7ca26d2f883ffd9a43
Signed-off-by: Mathieu Cote <mathieu.cote@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/41789
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Reviewed-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/dialogs/FilteredCheckboxTree.java

index e7eb9547493d0b263f8bf4ddb71e0dda67125c13..eab0bc23a080fbc6f980ecdd76ef6a23617f0ffd 100644 (file)
@@ -75,6 +75,7 @@ public class FilteredCheckboxTree extends FilteredTree implements ICheckable {
     @Override
     protected TreeViewer doCreateTreeViewer(Composite parentComposite, int style) {
         fCheckboxTreeViewer = new CheckboxTreeViewer(parentComposite, style);
+        fCheckboxTreeViewer.setUseHashlookup(true);
         fCheckboxTreeViewer.addCheckStateListener(new ICheckStateListener() {
             @Override
             public void checkStateChanged(CheckStateChangedEvent event) {
This page took 0.024955 seconds and 5 git commands to generate.