-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support calling formatters on each file separately #333
Comments
Note: I tried running the formatter once per-file in parallel using |
@michaelpj which version of In v2 we implemented a new approach:
The |
If we allowed providing the batch size that could be used to reduce the batch size and further improve concurrency, sending smaller numbers of paths to |
Ah, interesting. I am indeed on 0.6.1! I'll see if I can get the newer one. |
I've created #334 to follow up on the batch size |
Is your feature request related to a problem? Please describe.
At work we use
treefmt
to callormolu
on ~2.5k Haskell files. This takes about 32 seconds.A natural improvement would be to format those files in parallel. At the moment, that would require changing the formatter.
The alternative would be for
treefmt
to handle the parallelism by running the formatter on each file individually. Then the formatter doesn't need to do anything.Describe the solution you'd like
Some way of specifying how
treefmt
should call the formatter. Here's one option:batchSize
option to a formatter, with no batch size meaning "infinite"batchSize
, call the formatter once with each batch, in parallel.Then:
Describe alternatives you've considered
Do nothing, expect formatters to handle this.
The text was updated successfully, but these errors were encountered: