- Notifications
You must be signed in to change notification settings - Fork486
format files in batches with idea#2662
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
475ba64
to4acd83c
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It would be amazing for the idea formatter to be more usable in Spotless. Thanks for taking a shot at it! Have you tested this locally on a large project and seen a speedup?
Because Spotless does formatting one file at a time, I would not expect this to be much of a speedup unless we broke correctness. But if you have impressive benchmarking results please share them, otherwise I will probably close this approach as unlikely to work.
voidcacheFormattedResult(FileoriginalFile,Stringformatted) { | ||
formattedCache.put(originalFile,formatted); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
unfortunately, I don't think using theFile
alone is sufficient for a key. The key needs to include the file's content. This is because there are other steps which will operate on the file before or after the idea step.
Uh oh!
There was an error while loading.Please reload this page.
Note: this PR heavily relied on copilot to assist.