Bug 526209 - NameLookup.getModuleDescription does not cache NULL results
Summary: NameLookup.getModuleDescription does not cache NULL results
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7.1a   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.7.2   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
: 528695 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-18 06:05 EDT by Christian Dietrich CLA
Modified: 2017-12-13 07:01 EST (History)
6 users (show)

See Also:


Attachments
Possible patch (967 bytes, patch)
2017-10-18 06:11 EDT, Christian Dietrich CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Dietrich CLA 2017-10-18 06:05:43 EDT
NameLookup.getModuleDescription does not cache NULL results.
this leads to horrible performance in ASTParser.createBindings

see https://github.com/eclipse/xtext-eclipse/issues/424
Comment 1 Christian Dietrich CLA 2017-10-18 06:11:00 EDT
Created attachment 271065 [details]
Possible patch
Comment 2 Eclipse Genie CLA 2017-10-18 09:38:55 EDT
New Gerrit change created: https://git.eclipse.org/r/110317
Comment 3 Stephan Herrmann CLA 2017-10-18 11:12:43 EDT
looks plausible at a very quick glance ...
Comment 4 Stephan Herrmann CLA 2017-10-31 16:03:10 EDT
I rebased the gerrit and slightly modified the strategy, because as map values I prefer an explicit NO_MODULE object over the infamous 'null'.
Comment 6 Eclipse Genie CLA 2017-11-04 15:05:11 EDT
New Gerrit change created: https://git.eclipse.org/r/111015
Comment 7 Eclipse Genie CLA 2017-11-04 19:00:48 EDT
Gerrit change https://git.eclipse.org/r/111015 was merged to [R4_7_maintenance].
Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=9d4624151c91b926dcafec6aacee4335d95e2454
Comment 8 Stephan Herrmann CLA 2017-11-04 19:02:56 EDT
Released

for 4.7.2:

(In reply to Eclipse Genie from comment #7)
> Gerrit change https://git.eclipse.org/r/111015 was merged to
> [R4_7_maintenance].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=9d4624151c91b926dcafec6aacee4335d95e2454
> 

for 4.8 M4

(In reply to Eclipse Genie from comment #5)
> Gerrit change https://git.eclipse.org/r/110317 was merged to [master].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=addfd789e17dbb99af0304912ef45e4ae72c0605
> 

Thanks
Comment 9 Jay Arthanareeswaran CLA 2017-11-16 02:21:19 EST
Verified for 4.7.2 by code inspection.

Christian, when you have time, try out the build and confirm if the modified strategy solves your problem.
Comment 10 Christian Dietrich CLA 2017-11-16 02:26:24 EST
is there anywhere a oxygen.2 staging repo where i can consume this from?
Comment 11 Jay Arthanareeswaran CLA 2017-11-16 02:30:24 EST
(In reply to Christian Dietrich from comment #10)
> is there anywhere a oxygen.2 staging repo where i can consume this from?

You can use one of these update sites:

 http://download.eclipse.org/eclipse/updates/4.7-M-builds/

 http://download.eclipse.org/eclipse/updates/4.7-M-builds/M20171115-1700/
Comment 12 Christian Dietrich CLA 2017-11-16 05:56:19 EST
LGTM. thank you @jdt team
Comment 13 Manoj N Palat CLA 2017-11-16 23:07:29 EST
Verified for Eclipse Oxygen.2 (4.7.2) Build id: M20171115-1700
Comment 14 Lukas Eder CLA 2017-12-13 07:01:40 EST
*** Bug 528695 has been marked as a duplicate of this bug. ***