Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing JRE of Execution Environment is needlessly slow #2884

Open
jukzi opened this issue Sep 2, 2024 · 0 comments
Open

Changing JRE of Execution Environment is needlessly slow #2884

jukzi opened this issue Sep 2, 2024 · 0 comments

Comments

@jukzi
Copy link
Contributor

jukzi commented Sep 2, 2024

For example in the platform workspace changing the JRE freezes the UI for ~ 17sec.
image
image
image

There seem to be multiple reasons. Biggest:

  1. 10 seconds to touch all projects:

image

  1. 5 seconds in UI thread: to repeated scan the whole JRT for every affected java project in workspace:

image

The result (list of files in the JDK) could be shared between projects.
If that happens also during eclipse restart it might be worth for an optimization.

jukzi pushed a commit to jukzi/eclipse.jdt.core that referenced this issue Sep 3, 2024
JarPackageFragmentRootInfo.rawPackageInfo hold a list of all files in
the JRT but each projects gets its own JarPackageFragmentRootInfo.
Calculate that files independent of the instance and reuse if for all
projects. To safely share the result across threads an unmodifiable
datastructure is used.

* use record instead of String[2] for classes vs resources
* reduce rawtypes, unchecked conversions
* avoid char[] to String conversions

tested by JavaProjectTests, AttachedJavadocTests

eclipse-jdt#2884
jukzi pushed a commit to jukzi/eclipse.jdt.debug that referenced this issue Sep 3, 2024
Group touching the projects to a single WorkspaceOperation
Reduces UI freeze by ~9 sec for platform workspace (~500 projects)

eclipse-jdt/eclipse.jdt.core#2884
jukzi pushed a commit to jukzi/eclipse.jdt.debug that referenced this issue Sep 3, 2024
Group touching the projects to a single async operation with workspace
rule. Totally get rid of UI Freeze. And ~9 sec faster for platform
workspace (~500 projects)

eclipse-jdt/eclipse.jdt.core#2884

Pattern taken from JavaCompilerPropertyPage.performOk()
jukzi pushed a commit to eclipse-jdt/eclipse.jdt.debug that referenced this issue Sep 5, 2024
Group touching the projects to a single async operation with workspace
rule. Totally get rid of UI Freeze. And ~9 sec faster for platform
workspace (~500 projects)

eclipse-jdt/eclipse.jdt.core#2884

Pattern taken from JavaCompilerPropertyPage.performOk()
jukzi pushed a commit to jukzi/eclipse.jdt.core that referenced this issue Sep 5, 2024
JarPackageFragmentRootInfo.rawPackageInfo hold a list of all files in
the JRT but each projects gets its own JarPackageFragmentRootInfo.
Calculate that files independent of the instance and reuse if for all
projects. To safely share the result across threads an unmodifiable
datastructure is used.

* use record instead of String[2] for classes vs resources
* reduce rawtypes, unchecked conversions
* avoid char[] to String conversions

tested by JavaProjectTests, AttachedJavadocTests

eclipse-jdt#2884
jukzi pushed a commit to jukzi/eclipse.jdt.core that referenced this issue Sep 16, 2024
JarPackageFragmentRootInfo.rawPackageInfo hold a list of all files in
the JRT but each projects gets its own JarPackageFragmentRootInfo.
Calculate that files independent of the instance and reuse if for all
projects. To safely share the result across threads an unmodifiable
datastructure is used.

* use record instead of String[2] for classes vs resources
* reduce rawtypes, unchecked conversions
* avoid char[] to String conversions

tested by JavaProjectTests, AttachedJavadocTests

eclipse-jdt#2884
jukzi pushed a commit that referenced this issue Sep 17, 2024
JarPackageFragmentRootInfo.rawPackageInfo hold a list of all files in
the JRT but each projects gets its own JarPackageFragmentRootInfo.
Calculate that files independent of the instance and reuse if for all
projects. To safely share the result across threads an unmodifiable
datastructure is used.

* use record instead of String[2] for classes vs resources
* reduce rawtypes, unchecked conversions
* avoid char[] to String conversions

tested by JavaProjectTests, AttachedJavadocTests

#2884
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant