Bug 575893 - [performance] improve Search File... performance
Summary: [performance] improve Search File... performance
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.22   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.22 M1   Edit
Assignee: Jörg Kubitz CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2021-09-09 02:51 EDT by Jörg Kubitz CLA
Modified: 2022-01-27 10:08 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Kubitz CLA 2021-09-09 02:51:26 EDT
"Search File..." is slower then needed.
There are several performance improvements possible on file search. I will propose some.
Comment 1 Eclipse Genie CLA 2021-09-09 02:57:33 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/185193
Comment 2 Eclipse Genie CLA 2021-09-09 03:03:45 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/185194
Comment 3 Eclipse Genie CLA 2021-09-09 03:08:58 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/185195
Comment 4 Eclipse Genie CLA 2021-09-09 03:28:12 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/185196
Comment 5 Eclipse Genie CLA 2021-09-09 03:38:50 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/185198
Comment 6 Lars Vogel CLA 2021-09-09 04:15:53 EDT
Thanks Jörg, can you assign the bug to yourself and set the milestone as 4.22 M1?
Comment 7 Jörg Kubitz CLA 2021-09-09 04:22:54 EDT
(In reply to Lars Vogel from comment #6)
> Thanks Jörg, can you assign the bug to yourself and set the milestone as
> 4.22 M1?

No. Such requires committer rights. You can assign to me please.
Comment 9 Eclipse Genie CLA 2021-09-09 14:23:59 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/185262
Comment 11 Eclipse Genie CLA 2021-09-09 18:42:04 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/185270
Comment 12 Eclipse Genie CLA 2021-09-09 18:47:17 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/185271
Comment 13 Jörg Kubitz CLA 2021-09-09 18:51:26 EDT
And with all those changes together we have a true concurrent and fast search and fast UI. No more changes planed.
Comment 19 Simeon Andreev CLA 2021-09-22 05:54:59 EDT
Due to changes here, we observe unstable element order returned by this method: org.eclipse.search.ui.text.AbstractTextSearchResult.getMatches(Object)

Considering that this is API and not an internal class/method, this might be a problem.

The search result view itself shows stable and correct ordering. In our case only tests use AbstractTextSearchResult.getMatches() (and so fail sporadically).

I guess if there are problems with client code, someone will complain. Until then its probably not worth the effort investigating how to fix the unstable order. I do see that getMatches() uses some "default" sorting method, while the viewer allows setting a specific comparator (which might yield a stable order for the client elements). Though that comparator is not available to AbstractTextSearchResult, at least on first glance.
Comment 20 Jörg Kubitz CLA 2021-09-22 06:27:32 EDT
(In reply to Simeon Andreev from comment #19)
> Due to changes here, we observe unstable element order returned by this
> method:
> org.eclipse.search.ui.text.AbstractTextSearchResult.getMatches(Object)

Hi Simeon, 
the API never promised any order on that method. Instead the documentation said  "the *set* of ". It is in principle not possible to return any specific order with a parallel search other then due to a comparator. 

> I guess if there are problems with client code, someone will complain. 

If however someone would complain that the result on a singlethreaded search is in unexpected order we would know how to solve that. see comments after https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/185198/5

For /org/eclipse/search/core/tests/TestSearchResult.java we just removed the test for preserved order.