Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2018-09-22 16:24:23 +0000
committerLars Vogel2018-09-24 16:24:52 +0000
commitc830a13682e366a197a96dfe1b7ae47053a2673a (patch)
tree6f2c03915af721bd3f4ab0cd6648e5d70aba0b66
parent585b301b5c3a8860df918fb2401e378ab6dec976 (diff)
downloadeclipse.platform.text-c830a13682e366a197a96dfe1b7ae47053a2673a.tar.gz
eclipse.platform.text-c830a13682e366a197a96dfe1b7ae47053a2673a.tar.xz
eclipse.platform.text-c830a13682e366a197a96dfe1b7ae47053a2673a.zip
Bug 535752 - Performance of search viewI20180924-1800
With many search results being available, the search view takes almost all the time for refreshing the tree in the viewer. This can be avoided since we know perfectly that there is no structural change, when calling that method (the if insertChild() return value proves that). Therefore instead of a structure refresh it is sufficient to update a single node of the viewer only. For a search with more than 500.000 results, this brings the search runtime down from 3 minutes to 3 seconds on my system. Change-Id: I9c80b9e2e0c6c9aaa8cc732c7eec2d76dfc55305 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileTreeContentProvider.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileTreeContentProvider.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileTreeContentProvider.java
index a99c9704cde..363a0485dc8 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileTreeContentProvider.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileTreeContentProvider.java
@@ -102,7 +102,7 @@ public class FileTreeContentProvider implements ITreeContentProvider, IFileSearc
fTreeViewer.add(parent, child);
} else {
if (refreshViewer)
- fTreeViewer.refresh(parent);
+ fTreeViewer.update(parent, null);
return;
}
child= parent;

Back to the top