-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
'ratchet' mode is very slow (plugin-maven) #1025
Comments
That is surprising! Here's the codepath as it exists today, but #935 is gonna change things a bit. spotless/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java Lines 189 to 209 in 08bf08c
spotless/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java Lines 215 to 238 in 08bf08c
spotless/plugin-maven/src/main/java/com/diffplug/spotless/maven/GitRatchetMaven.java Lines 59 to 72 in 08bf08c
|
I believe this should be improved in |
On my project on my Intel Macbook Pro, using version 2.17.7 it still takes about 9 minutes, similar to version 2.17.6. With ratchet turned off it takes 20 seconds with either version, so it's not made a noticeable difference. |
Bummer :(. I'm surprised by this, but the good news is that |
Can this be reopened? |
This should be much improved in our latest I'm going to close this again, but please reopen if it is still issue in the latest releases. |
I have 6830 java files in my maven project (found with
git ls-files "*.java" | wc -l
) spread across 44 modules. When I have no changes (git diff --name-only origin/develop
returns nothing) and I scan in ratchet mode, it takes nearly 10 minutes to do a no-op. When I removed ratchet mode because I wanted to see how many files were still misformatted, it took less than 20 seconds, even though it had to process every java file.I was expecting it to be a lot slower because it had to actually read and format 6830 java files, rather than just look at git and see nothing has changed.
If you are submitting a bug, please include the following:
gradlew spotless[Apply/Check] --stacktrace
If you're just submitting a feature request or question, no need for the above.
The text was updated successfully, but these errors were encountered: