Skip to content

Use bulk mode in class name completion (fixes #40)#42

Closed
derSascha wants to merge 1 commit into
bobbylight:masterfrom
derSascha:use-bulk-mode-in-class-name-completion
Closed

Use bulk mode in class name completion (fixes #40)#42
derSascha wants to merge 1 commit into
bobbylight:masterfrom
derSascha:use-bulk-mode-in-class-name-completion

Conversation

@derSascha
Copy link
Copy Markdown
Contributor

Running Java class name completion on large jar files (e.g. Spark, 35MB, 22K Classes) takes long (e.g. Class names with an A takes ~180 Seconds).

Open the jar and seeking to the class on each class takes very long:

@Override
public ClassFile createClassFile(String entryName) throws IOException {
JarFile jar = new JarFile(jarFile);
try {
return createClassFileImpl(jar, entryName);
} finally {
jar.close();
}
}

Instead of open the jar on every class, use the bulk API on class name completion. This reduce the time in the example above to ~3s.

@derSascha
Copy link
Copy Markdown
Contributor Author

@bobbylight what do you think about the PR? Its a very small but very power full fix.

@bobbylight
Copy link
Copy Markdown
Owner

Closing in favor of #83. Thanks @derSascha !

@bobbylight bobbylight closed this Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants