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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

derSascha
Copy link
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
Contributor Author

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

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.

1 participant