eclipse-jdt / eclipse-jdt/eclipse.jdt.core

[performance] PackageFragmentRoot.getRawClasspathEntry() has bad impact on startup performance

Open
#3,468 7 comments 0 reactions 1 assignee Claimed by @jarthana View on GitHub
performance
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

While looking at a problem [here](https://github.com/eclipse-pde/eclipse.pde/issues/1481) I noticed that `PackageFragmentRoot.getRawClasspathEntry()` has a very bad impact on startup performance because it calls `project.getResolvedClasspath()`

https://github.com/eclipse-jdt/eclipse.jdt.core/blob/17fc31849b5225c441e93a8cc7eec636cd05067f/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java#L616

this leads to a resolve operation of all classpath containers (that actually should happen in a background thread!) in the main UI thread whenever one has an open Java Editor + Package Explorer open. This even blocks the whole UI startup of eclipse.

This is sadly not the only place where this could happen... but the other places are more UI related.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.