-
Notifications
You must be signed in to change notification settings - Fork 236
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
Running linter on multiple files at once suspiciously slow #557
Comments
I'm running into this issue where I'm trying to lint a large amount of files and it is so slow that it is unpleasant to integrate in my development flow. I noticed using xargs with parallelism is way faster than passing all the files in one jsonnet-lint invocation.
There's definitely low hanging fruit for optimization here. I noticed in the code it is looping over every input file so this could at least by parallelized by the tool itself. In the mean time, here is my ugly command:
|
When running all tests together, all root nodes are collected for all nodes at first. Then when evaluating each node individually, the type check mechanism takes all roots into account, although they are mostly unnecessary. Moving the part of collecting the root nodes into the main evaluating loop, results in the multiple tests running as fast as expected (0.24s in my case)
|
There is something weird going on:
I would expect it to run about as fast as when running each file individually (actually there is room for optimization and avoiding common work).
The text was updated successfully, but these errors were encountered: