eclipse-jdt / eclipse-jdt/eclipse.jdt.core
[performance] PackageFragmentRoot.getRawClasspathEntry() has bad impact on startup 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
Assessment
This issue has not been assessed yet.