You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
I can't reproduce on 4.25 but I can reproduce on master / SDK-I20230426-1800-linux-gtk-x86_64.
In my workspace that contains most of SDK bundles as sources case-insensitive searching for "a" in all files freezes UI after roughly 1.000.000 matches and at 2%, staying in that state with 100% CPU load for minutes.
I have to kill IDE because it become not responsible.
In my (other and bigger) workspace on 4.25 search takes few seconds to find 26.000.000 matches without any freeze.
In the jstacks I see AbstractTextSearchResult.getMatchCount() that is almost always on top
"main" eclipse-platform/eclipse.platform.text#1 prio=6 os_prio=0 cpu=538026.91ms elapsed=20829.88s tid=0x00007ffff0028f70 nid=0x9676 runnable [0x00007ffff7fb6000]
java.lang.Thread.State: RUNNABLE
at java.util.concurrent.ConcurrentHashMap$Traverser.advance(java.base@17.0.6-internal/ConcurrentHashMap.java:3383)
at java.util.concurrent.ConcurrentHashMap$ValueIterator.next(java.base@17.0.6-internal/ConcurrentHashMap.java:3483)
at org.eclipse.search.ui.text.AbstractTextSearchResult.getMatchCount(AbstractTextSearchResult.java:305)
at org.eclipse.search.internal.ui.text.FileTreeContentProvider.getMatchCount(FileTreeContentProvider.java:189)
at org.eclipse.search.internal.ui.text.FileTreeContentProvider.elementsChanged(FileTreeContentProvider.java:239)
- locked <0x0000000456e67178> (a org.eclipse.search.internal.ui.text.FileTreeContentProvider)
at org.eclipse.search.internal.ui.text.FileSearchPage.elementsChanged(FileSearchPage.java:343)
at org.eclipse.search.ui.text.AbstractTextSearchViewPage.runBatchedUpdates(AbstractTextSearchViewPage.java:1263)
at org.eclipse.search.ui.text.AbstractTextSearchViewPage$UpdateUIJob.runInUIThread(AbstractTextSearchViewPage.java:154)
at org.eclipse.ui.progress.UIJob.lambda$0(UIJob.java:148)
at org.eclipse.ui.progress.UIJob$$Lambda$725/0x00000008012bee70.run(Unknown Source)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
- locked <0x0000000454260438> (a org.eclipse.swt.widgets.RunnableLock)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5040)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4520)
I assume (after briefly looking into the change #144) that this line in the for loop adds extra N^2 or higher complexity counting how many matches found for each found search match:
Note too that I've occasionally seen a search view that shows fewer matches than the count says should be present, but if I repeat the search, then it all looks correct with all the matches present. This is very disconcerting, but not reproducible...
Activity
iloveeclipse commentedon Apr 27, 2023
@jjohnstn, @mickaelistria : seem to be regression from #144. Could you please check?
iloveeclipse commentedon Apr 27, 2023
I assume (after briefly looking into the change #144) that this line in the for loop adds extra N^2 or higher complexity counting how many matches found for each found search match:
eclipse.platform.text/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileTreeContentProvider.java
Line 239 in 549c958
merks commentedon Apr 27, 2023
Note too that I've occasionally seen a search view that shows fewer matches than the count says should be present, but if I repeat the search, then it all looks correct with all the matches present. This is very disconcerting, but not reproducible...
jjohnstn commentedon Apr 27, 2023
@iloveeclipse Will look at it.
[WIP] wild guess if that is the fix
iloveeclipse commentedon Apr 27, 2023
@jjohnstn : I was unfortunately in the meeting, so couldn't test, but check this idea: #188 - if the problem is like in the line above.
iloveeclipse commentedon Apr 27, 2023
Actually it looks like #188 fixes the issue. I can search and find 19.000.000 matches in few seconds in the workspace where it was frozen before.
Text search freezes UI (eclipse-platform#187)
jjohnstn commentedon Apr 27, 2023
@iloveeclipse Please see my comment on #188
Fix UI freeze when searching
Fix UI freeze when searching