Bug 535752 - Regexp search performance with \n
Summary: Regexp search performance with \n
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Search (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Michael Keppler CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: performance
Depends on:
Blocks:
 
Reported: 2018-06-11 03:12 EDT by Karsten Thoms CLA
Modified: 2020-11-13 07:13 EST (History)
2 users (show)

See Also:


Attachments
Screenshot: Profiler - Blocked Threads (327.43 KB, image/png)
2018-06-11 03:12 EDT, Karsten Thoms CLA
no flags Details
Screenshot: Profiler - Hot Spot (248.77 KB, image/png)
2018-06-11 03:13 EDT, Karsten Thoms CLA
no flags Details
Screenshot: Profiler - Hot Spot 2 (261.08 KB, image/png)
2018-06-11 03:13 EDT, Karsten Thoms CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Thoms CLA 2018-06-11 03:12:13 EDT
Created attachment 274421 [details]
Screenshot: Profiler - Blocked Threads

Searched for "\n" for "*.java" files in a huge workspace (wanted a simple LOC stats). Since the search took a long time I took a profile and saw many blocking situations in 

org.eclipse.search.internal.ui.text.FileSearchQuery$TextSearchResultCollector.acceptPatternMatch(TextSearchMatchAccess) FileSearchQuery.java:116

Also some hot spots are:
- org.eclipse.search.internal.ui.text.FileTreeContentProvider.elementsChanged(Object[])
- org.eclipse.search.ui.text.AbstractTextSearchResult.getMatches(Object) AbstractTextSearchResult.java
Comment 1 Karsten Thoms CLA 2018-06-11 03:13:23 EDT
Created attachment 274422 [details]
Screenshot: Profiler - Hot Spot
Comment 2 Karsten Thoms CLA 2018-06-11 03:13:43 EDT
Created attachment 274423 [details]
Screenshot: Profiler - Hot Spot 2
Comment 3 Michael Keppler CLA 2018-09-22 12:18:01 EDT
At least on Windows the main issue here is the refresh of the viewer. Many of the jface viewers perform really bad when refreshing often or on big contents (which is the case here).

I'll attach a patch to avoid the structure refresh of the viewer. For me that makes a huge difference: A search with more than 500.000 results previously took 3 minutes to display, now that is 3 seconds.

Karsten, please check if that also leads to improvements on your Mac.
Comment 4 Eclipse Genie CLA 2018-09-22 12:25:25 EDT
New Gerrit change created: https://git.eclipse.org/r/129833
Comment 6 Karsten Thoms CLA 2018-09-24 16:38:47 EDT
Thanks, Michael!
Comment 7 Karsten Thoms CLA 2018-10-18 23:44:48 EDT
Sorry for reopening, the blocking still remains.
Comment 8 Dani Megert CLA 2018-11-23 11:48:06 EST
 Michael, can you take a look?

Whoever wants to work on this, please set the target milestone again.
Comment 9 Eclipse Genie CLA 2020-11-13 07:13:04 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.