eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

UI Freeze: deleting large search Result

Open r6squeegee opened this issue 2 years ago • 4 comments

When using the ctrl-h search feature, if I get a lot of search results (like 181,841 in my current example) if I highlight a project or folder which has a lot of entries with in it and press "delete" to remove those items from the current search results, it sends 1 of my cpu cores to 100% and the entire UI freezes. Even after 5 minutes the system remains frozen and the 1 cpu core is still at 100%.

I've had this happen 2 or 3 times now so it seems relatively reproducible.

os : fedora 38, xfce jdk : openjdk 17.0.8+7 jvm memory : 4g eclipse : version=2023-06 (4.28.0) build id: 20230608-1333

r6squeegee avatar Aug 15 '23 21:08 r6squeegee

  1. Could you please try with latest version from https://download.eclipse.org/eclipse/downloads/drops4/I20230815-0600/ ?
  2. If it hangs, could you please create jstack and attach here?
  3. Did it worked before, and if yes, in which release?

iloveeclipse avatar Aug 15 '23 21:08 iloveeclipse

just tried it with version=2023-09 (4.29) build id= i2030815-0600

yes it still hangs

jstack is attached jstack.txt

as for has it ever worked before : I don't know, eclipse use to hang on large search results until #189 (https://github.com/eclipse-platform/eclipse.platform.text/pull/189) so I've never gotten this far before.

r6squeegee avatar Aug 15 '23 22:08 r6squeegee

jstack is attached

Perfect!

"main" #1 prio=6 os_prio=0 cpu=122922.58ms elapsed=242.81s tid=0x00007f4988026730 nid=0x158a51 runnable  [0x00007f498f3f9000]
   java.lang.Thread.State: RUNNABLE
	at java.util.TimSort.mergeHi([email protected]/TimSort.java:854)
	at java.util.TimSort.mergeAt([email protected]/TimSort.java:520)
	at java.util.TimSort.mergeCollapse([email protected]/TimSort.java:448)
	at java.util.TimSort.sort([email protected]/TimSort.java:245)
	at java.util.Arrays.sort([email protected]/Arrays.java:1233)
	at org.eclipse.search.ui.text.AbstractTextSearchResult.getMatches(AbstractTextSearchResult.java:82)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.getDisplayedMatchCount(AbstractTextSearchViewPage.java:1118)
	at org.eclipse.search.internal.ui.text.FileSearchPage.getDisplayedMatches(FileSearchPage.java:542)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.collectAllMatchesBelow(AbstractTextSearchViewPage.java:1384)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.collectAllMatchesBelow(AbstractTextSearchViewPage.java:1387)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.collectAllMatchesBelow(AbstractTextSearchViewPage.java:1387)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.collectAllMatchesBelow(AbstractTextSearchViewPage.java:1387)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.collectAllMatchesBelow(AbstractTextSearchViewPage.java:1387)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.collectAllMatchesBelow(AbstractTextSearchViewPage.java:1387)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.internalRemoveSelected(AbstractTextSearchViewPage.java:1364)
	at org.eclipse.search2.internal.ui.basic.views.RemoveSelectedMatchesAction.run(RemoveSelectedMatchesAction.java:36)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)

iloveeclipse avatar Aug 16 '23 04:08 iloveeclipse

I personally never used to delete something in a search result. PR welcome. Probably needs to delete all at once instead of one by one.

jukzi avatar Aug 17 '23 06:08 jukzi