Skip to content

[Perf] Useless classpath expansion (reading MANIFEST.MF) #1322

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

Open
mickaelistria opened this issue Mar 21, 2025 · 1 comment
Open

[Perf] Useless classpath expansion (reading MANIFEST.MF) #1322

mickaelistria opened this issue Mar 21, 2025 · 1 comment

Comments

@mickaelistria
Copy link

While profiling, I noticed that Javac seems to automatically expand the classpath for the dependencies: it does read all the jar files, look for some MANIFEST.MF and tries to read a Class-Path element in it to expand it.
The following screnshot shows the stack causing that:

Image
On that particular recording, this operation accounts for ~8% of the time when requesting completion.

This operation is useless in Eclipse IDE, which does already resolve the classpath. It would be interesting to get rid of it. This would probably involve overriding some parts in the JavacFileManager, but a dummy attempt has proven it to be non-trivial as the Locations class is only package-visible.

@mickaelistria
Copy link
Author

An interesting entry point for debugging is SearchPath.expandJarClassPaths()

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