Bug 458852 - [search] Speed up JDT text searches by supporting parallelism in its TextSearchRequestors
Summary: [search] Speed up JDT text searches by supporting parallelism in its TextSear...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.5 M6   Edit
Assignee: Terry Parker CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 432049 441016
Blocks:
  Show dependency tree
 
Reported: 2015-01-30 13:36 EST by Terry Parker CLA
Modified: 2015-03-04 04:25 EST (History)
2 users (show)

See Also:
daniel_megert: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Terry Parker CLA 2015-01-30 13:36:25 EST
Bug 458704 introduced new API to TextSearchRequestor to support faster text searches. Update the JDT's TextSearchRequestors to support collecting results from multiple jobs running in parallel.

I see three subclasses of TextSearchRequestor:
1) org.eclipse.jdt.internal.corext.refactoring.util.QualifiedNameFinder.ResultCollector, which is used in package rename refactorings
2) org.eclipse.jdt.internal.ui.propertiesfileeditor.PropertyKeyHyperlink.ResultCollector, which is used to find hyperlink targets to keys in .properties files
3) An anonymous class in org.eclipse.jdt.ui.examples.MyRenameTypeParticipant.createChange(), which is in the org.eclipse.jdt.ui.tests plug-in

Dani, do you know of any other subclasses?
Comment 1 Terry Parker CLA 2015-01-30 18:33:11 EST
The Gerrit review is here: https://git.eclipse.org/r/40809

When running a hosted Eclipse instance and enabling performance tracing, I saw the text search portion of properties file hyperlink detection speed up by a factor of 2x (~300ms -> ~150ms), and the text search portion of package rename refactoring speed up by a factor of 2x (~1300ms -> 650ms). I found both operations to be perceptibly faster.
Comment 2 Dani Megert CLA 2015-02-09 11:20:56 EST
(In reply to Terry Parker from comment #0)
> Bug 458704 introduced new API to TextSearchRequestor to support faster text
> searches. Update the JDT's TextSearchRequestors to support collecting
> results from multiple jobs running in parallel.
> 
> I see three subclasses of TextSearchRequestor:
> 1)
> org.eclipse.jdt.internal.corext.refactoring.util.QualifiedNameFinder.ResultCollector,
> which is used in package rename refactorings
> 2)
> org.eclipse.jdt.internal.ui.propertiesfileeditor.PropertyKeyHyperlink.ResultCollector,
> which is used to find hyperlink targets to keys in .properties files
> 3) An anonymous class in
> org.eclipse.jdt.ui.examples.MyRenameTypeParticipant.createChange(), which is
> in the org.eclipse.jdt.ui.tests plug-in
> 
> Dani, do you know of any other subclasses?

Nope, those are the ones, but I'd leave the example alone.
Comment 3 Terry Parker CLA 2015-02-09 12:02:59 EST
(In reply to Dani Megert from comment #2)
> (In reply to Terry Parker from comment #0)
> > Bug 458704 introduced new API to TextSearchRequestor to support faster text
> > searches. Update the JDT's TextSearchRequestors to support collecting
> > results from multiple jobs running in parallel.
> > 
> > I see three subclasses of TextSearchRequestor:
> > 1)
> > org.eclipse.jdt.internal.corext.refactoring.util.QualifiedNameFinder.ResultCollector,
> > which is used in package rename refactorings
> > 2)
> > org.eclipse.jdt.internal.ui.propertiesfileeditor.PropertyKeyHyperlink.ResultCollector,
> > which is used to find hyperlink targets to keys in .properties files
> > 3) An anonymous class in
> > org.eclipse.jdt.ui.examples.MyRenameTypeParticipant.createChange(), which is
> > in the org.eclipse.jdt.ui.tests plug-in
> > 
> > Dani, do you know of any other subclasses?
> 
> Nope, those are the ones, but I'd leave the example alone.

I can either revert the example completely or update it with comments only. Let me know which one you would prefer.
Comment 4 Dani Megert CLA 2015-02-09 13:52:57 EST
(In reply to Terry Parker from comment #3)
> I can either revert the example completely or update it with comments only.
> Let me know which one you would prefer.

Let's just revert the changes for that class.
Comment 5 Terry Parker CLA 2015-02-10 18:07:38 EST
(In reply to Dani Megert from comment #4)
> (In reply to Terry Parker from comment #3)
> > I can either revert the example completely or update it with comments only.
> > Let me know which one you would prefer.
> 
> Let's just revert the changes for that class.

Done.
Comment 8 Lars Vogel CLA 2015-02-11 04:39:35 EST
(In reply to Dani Megert from comment #7)
> Thanks Terry, submitted with
> http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/
> ?id=1a8fa338581bcf92326491e70672c0d91b69acc2

Thanks also from my side. Dani, is JDT using the "noteworthy" tag? I think this one qualifies for N&N.
Comment 9 Dani Megert CLA 2015-02-11 05:25:34 EST
(In reply to Lars Vogel from comment #8)
> (In reply to Dani Megert from comment #7)
> > Thanks Terry, submitted with
> > http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/
> > ?id=1a8fa338581bcf92326491e70672c0d91b69acc2
> 
> Thanks also from my side. Dani, is JDT using the "noteworthy" tag? I think
> this one qualifies for N&N.

It doesn't hurt to use it, but that's not our main/only source to create the N&N at the end of a milestone.