Bug 551970 - Show Quick Text Search results directly in Find Actions
Summary: Show Quick Text Search results directly in Find Actions
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.12   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.14 M3   Edit
Assignee: Mickael Istria CLA
QA Contact: Mickael Istria CLA
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 552935
Blocks: 553462 560415
  Show dependency tree
 
Reported: 2019-10-09 09:15 EDT by Mickael Istria CLA
Modified: 2020-02-22 08:33 EST (History)
4 users (show)

See Also:


Attachments
partial threaddump (24.95 KB, text/plain)
2019-11-11 11:15 EST, Julian Honnen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2019-10-09 09:15:51 EDT
The first results of Quick Text Search should be visible directly in "Find Actions"
Comment 1 Eclipse Genie CLA 2019-10-09 11:06:35 EDT
New Gerrit change created: https://git.eclipse.org/r/150844
Comment 4 Sarika Sinha CLA 2019-10-17 03:29:46 EDT
(In reply to Eclipse Genie from comment #3)
> Gerrit change https://git.eclipse.org/r/150844 was merged to [master].
> Commit:
> http://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/
> ?id=2c2308f00654382c5132b1550bb5b3f071822862

I get this error :
Error Line 67, Column 13: document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
         <ul>

No bug number also added in the entry.
Comment 5 Julian Honnen CLA 2019-11-11 11:15:10 EST
Created attachment 280594 [details]
partial threaddump

Quick access has degraded severely in my large workspace. Opening quick access and typing "target" spawns a couple of quick search jobs (for "tar", "targ", etc.), and the list isn't filtered anymore until those are completed.

The jobs for shorter strings get canceled, but that seems to be ignored by the job (thread dump extract attached).

It takes nearly a minute until the expected target platform preference item is focused.

Given my workspace size, I don't expect the quick search to be anything but slow so that in itself is not an issue. But it must not block other proposals/filtering.

For now I've added "src" to the quick search exclusion list or is there another option to disable it completely?

Version: 2019-12 (4.14)
Build id: I20191107-1800

Not sure why I didn't notice that before.
Comment 6 Julian Honnen CLA 2019-11-11 11:22:57 EST
The hotspot seems to be DefaultPriorityFunction::computeIgnoredFolders:
  //TODO: Hopefully this won't take too long to compute. Otherwise we may need to look at ways of caching it.
  // it probably doesn't change that often.

IWorkspaceRoot::findContainersForLocationURI is unbearably slow on a workspace with many projects.
Comment 7 Andrey Loskutov CLA 2019-11-11 12:26:27 EST
(In reply to Julian Honnen from comment #6)
> IWorkspaceRoot::findContainersForLocationURI is unbearably slow on a
> workspace with many projects.

This should never be used in Quick Access, it has n^3 or worse complexity. If there are no alternatives (I haven't checked the code), I would propose to revert last change.
Comment 8 Eclipse Genie CLA 2019-11-12 03:34:02 EST
New Gerrit change created: https://git.eclipse.org/r/152466
Comment 9 Mickael Istria CLA 2019-11-12 05:48:20 EST
(In reply to Andrey Loskutov from comment #7)
> This should never be used in Quick Access, it has n^3 or worse complexity.

Can it be documented in the Javadoc that this is a n^3 operation to avoid in case responsiveness matters?

> If there are no alternatives (I haven't checked the code), I would propose
> to revert last change.

There is a timeout of 3 seconds for the QuickSearchQuickAccessComputer, I suggest we simply drop it to 200ms.
In a near-ish future, the timeout would be controlled by QuickAccess itself (there is a ProgressMonitor already passed to computers to achieve that, it's just not much used so far).
Comment 11 Sarika Sinha CLA 2019-11-20 02:45:53 EST
@Mickael,
Regarding the N&N Entry for "Find Actions finds text in file contents"

I could not find the "Find Actions" listing the matching texts from files in Build id: I20191118-0600 ?
Comment 12 Mickael Istria CLA 2019-11-20 03:34:08 EST
(In reply to Sarika Sinha from comment #11)
> @Mickael,
> Regarding the N&N Entry for "Find Actions finds text in file contents"
> 
> I could not find the "Find Actions" listing the matching texts from files in
> Build id: I20191118-0600 ?

Did you see, in the N&N, the potential explanation of the cause
"""
If the Quick Text Search bundle wasn't started yet, you may miss those matches. In this case, you can ask directly Find Actions to activate the Quick Text Search by looking for a Activate bundle for 'File Content' proposals entry. 
"""
Comment 13 Sarika Sinha CLA 2019-11-20 04:37:01 EST
(In reply to Mickael Istria from comment #12)
> (In reply to Sarika Sinha from comment #11)
> > @Mickael,
> > Regarding the N&N Entry for "Find Actions finds text in file contents"
> > 
> > I could not find the "Find Actions" listing the matching texts from files in
> > Build id: I20191118-0600 ?
> 
> Did you see, in the N&N, the potential explanation of the cause
> """
> If the Quick Text Search bundle wasn't started yet, you may miss those
> matches. In this case, you can ask directly Find Actions to activate the
> Quick Text Search by looking for a Activate bundle for 'File Content'
> proposals entry. 
> """

Yes, my mistake. I missed the text between two images. Not sure about others but If the sentence could start with "If you don't see those matches.." would have helped me.

It's cool that we have added the step to activate the proposal from the dialog itself.
Comment 14 Dani Megert CLA 2020-02-22 08:31:26 EST Comment hidden (obsolete)
Comment 15 Dani Megert CLA 2020-02-22 08:32:20 EST
(In reply to Mickael Istria from comment #12)
> """
> If the Quick Text Search bundle wasn't started yet, you may miss those
> matches. In this case, you can ask directly Find Actions to activate the
> Quick Text Search by looking for a Activate bundle for 'File Content'
> proposals entry. 
> """
This is not practical. I've filed bug 560415 to fix this.