-
Notifications
You must be signed in to change notification settings - Fork 510
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
Improve ktlint performances when the input patterns are absolute paths #1144
Conversation
it looks like the build fails because of a dependency verification issue which I believe is not related to my change but I'll see what I can do.
|
@rciovati thanks so much for this change. I just merged a PR which should fix the CI builds; can you rebase? |
@shashachu rebased, thanks! |
argh. windows build failing. 🤦♀️ |
@shashachu I've just rebased one more time! |
haha it's killing me! i'm not sure what's happening with the dependency verification... |
@rciovati could you rebase again? This time verification should pass |
@rciovati tests are failing, could you update your change, so they will pass? |
@Tapchicoma I'll try. I don't have a windows machine so this might take a while. |
@rciovati @Tapchicoma
|
@shashachu it looks valid to me! I've just pushed the change. Thank you so much for looking into this one 🙏 |
@rciovati looks like you are missing an import :) |
@shashachu of course 🤦 fixed |
hallelujah! thanks @rciovati for your patience! |
Description
This PR proposes a solution for the performance issue described in #1135.
When ktlint gets a bunch of absolute paths there is no need to walk through the file system and search for them, we can just resolve and analyze them directly.
Before:
After:
In our project it speeds up the execution from ~30s down to less than 1s.
No additional tests were added, the exist ones passes.
Checklist
CHANGELOG.md
is updated