Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 569069 - Use JVM memory structures in JDT core
Summary: Use JVM memory structures in JDT core
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.14   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.21 M1   Edit
Assignee: Jörg Kubitz CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 569235
Blocks:
  Show dependency tree
 
Reported: 2020-11-23 10:58 EST by Lars Vogel CLA
Modified: 2022-01-17 06:59 EST (History)
4 users (show)

See Also:


Attachments
source for jmh map benchmarks (308.93 KB, application/x-zip-compressed)
2021-03-02 06:32 EST, Jörg Kubitz CLA
no flags Details
map benchmark result image (82.75 KB, image/png)
2021-03-02 06:35 EST, Jörg Kubitz CLA
no flags Details
benchmark result.log (23.13 KB, application/octet-stream)
2021-03-02 06:36 EST, Jörg Kubitz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2020-11-23 10:58:13 EST
I see lots of good work from Gunnar in JDT core abandoned due to time constraints on Gunnars side.

This bug is to at least capture some of the work so that this is not forgotten.

For example https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/169916/2 looks promissing.
Comment 1 Jörg Kubitz CLA 2021-03-02 06:32:02 EST
Created attachment 285700 [details]
source for jmh map benchmarks
Comment 2 Jörg Kubitz CLA 2021-03-02 06:35:25 EST
Created attachment 285701 [details]
map benchmark result image

The results (logarithmic scale) show a benefit of using jav.util.Map.
Comment 3 Jörg Kubitz CLA 2021-03-02 06:36:54 EST
Created attachment 285702 [details]
benchmark result.log
Comment 4 Jörg Kubitz CLA 2021-03-02 06:42:45 EST
todo: rework https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/172918

Same could be applied to other Maps like
 org.eclipse.jdt.internal.core.util.SimpleWordSet.SimpleWordSet
 org.eclipse.jdt.internal.compiler.util.HashtableOfObject
 org.eclipse.jdt.internal.compiler.util.HashtableOfModule

...
?
Comment 5 Jörg Kubitz CLA 2021-03-03 02:12:09 EST
org.eclipse.jdt.internal.compiler.util.SimpleLookupTable
Comment 6 Eclipse Genie CLA 2021-03-10 11:02:55 EST
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/177529
Comment 7 Manoj N Palat CLA 2021-04-22 05:17:09 EDT
Moving target to the next M1
Comment 8 Eclipse Genie CLA 2021-06-07 08:25:23 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/181516
Comment 9 Eclipse Genie CLA 2021-06-07 09:38:53 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/181518
Comment 13 Lars Vogel CLA 2021-06-16 04:27:00 EDT
Thanks Jörg for taking over here. If I look at Gunnars original patch series, we still have multiple strucutures which could be converted. See the Gerrit 
chain starting from https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/169916

Can you also convert the other structures?
Comment 14 Jörg Kubitz CLA 2021-06-16 04:48:43 EDT
(In reply to Lars Vogel from comment #13)
> Can you also convert the other structures?

Lars, I wont have the time for those as they are no hotspots in our usecases. Maybe they could be improved but the improvement seem not be significant performance-wise - as those other datastructures are not used as often.

Maybe it would be a nice code-cleanup to use standard datastructures not for performance but for reducing code. However i doubt JDT core team would like such changes without proving any benefit and detailed measurements.

Better focus on known issues.
Comment 15 Jörg Kubitz CLA 2021-06-23 07:29:23 EDT
@Lars can we close this or do you want to take further actions?
Comment 16 Manoj N Palat CLA 2021-07-07 01:48:02 EDT
Verified with Eclipse. Version: 2021-09 (4.21) Build id: I20210706-1800
[Verified by code read]