-
Notifications
You must be signed in to change notification settings - Fork 41
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
Reduce memory requirements of checkstyleNohttp #60
Comments
For me, it initially died on this commit: spring-projects/spring-boot@e8d809f |
This continues to be a problem. In my clone of Spring Boot 2.7.x branch, it's checking 9744 files and is failing quite reliably when configured with a heap of |
I think this might be a general checkstyle issue, I can't see anything in nohttp that looks funky. The Gradle plugin delegates to an Ant task which delegate to |
I looked at it yesterday. Checkstyle reads the whole file in memory (in |
Looking at a heap dump in YourKit taken while the task is running, I think the problem is the sheer number of files rather than any one big file. There also appears to be some inefficiencies in Ant or the Checkstyle Ant task. In my Spring Boot 2.7.x checkout, I have 79297 files according to |
I've exported all of the strings from the memory snapshot and can see that there's some duplication. For example:
In total there were 1,341,465 strings exported but only 298,247 of those were unique. |
The inefficiency appears to be in how Gradle maps a |
In Spring Boot's build, we currently allocate a 1GB max heap to
checkstyleNohttp
:Unfortunately, this isn't always sufficient and the build can still sometimes fail with an OutOfMemoryError:
Looking at some data from ge.spring.io, @mhalbritter and I have both seen this failure in the last 7 days. We could just bump the max heap size but a gigabyte already feels excessive for a check that can, presumably, be performed on a file-by-file basis.
The text was updated successfully, but these errors were encountered: