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

BanDuplicateClasses Performance Issue #122

Closed
thomasnikolay opened this issue Dec 17, 2020 · 1 comment · Fixed by #218
Closed

BanDuplicateClasses Performance Issue #122

thomasnikolay opened this issue Dec 17, 2020 · 1 comment · Fixed by #218
Assignees

Comments

@thomasnikolay
Copy link

thomasnikolay commented Dec 17, 2020

We have a large Dependency with some big dependencies. The check for BanDuplicateClasses tooks over 10 minutes. The check consume the most time in

InputStream inputStream = jar.getInputStream( jar.getEntry( classFilePath ) );
to extract the file from the JAR for generating the hash value.

image

Is it possible to optimize this behavior? I think to cache the JAR could help instead of to read the JAR for each file again.

@slawekjaranowski slawekjaranowski self-assigned this Jun 26, 2022
slawekjaranowski added a commit that referenced this issue Jun 26, 2022
hash is calculated during jar scanning,
before was calculated during class compare
which cause to open and read jars again - now jar is opened once

close #122
@slawekjaranowski
Copy link
Member

@thomasnikolay if you can - please check rule code from PR on your project, should be better.

slawekjaranowski added a commit that referenced this issue Jul 1, 2022
hash is calculated during jar scanning,
before was calculated during class compare
which cause to open and read jars again - now jar is opened once

close #122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants