-
Notifications
You must be signed in to change notification settings - Fork 148
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
Process multiple files in parallel #770
Conversation
Awesome, thanks!!
Apologies, I'll probably be a little bit slow on merging this since I want to re-read the InfoFormatter changes a couple times, and make sure I personally understand how Haskell's laziness works w/r to the new code. (I trust that doesn't really break anything, both from a quick skim of the code, and from the testing you've done; but I want to put a bit higher of a bar on myself to understand what the runtime behavior actually is.) Here are a couple things I'll want to take a look at before I merge. Feel free to take a stab at them if you want, or no worries if you don't, I should have a chance to get to them in the next couple weeks.
|
Testing version for MacOS arm64 is available here: https://github.com/avh4/elm-format/actions/runs/4141690402 |
Just an additional benchmark on a Mac M1 using (using https://github.com/sharkdp/hyperfine
|
I took a brief look at doing this now, but it doesn't seem worth the time atm. Doing it in a clean way seems like it would require a way of coordinating an additional thread, which would fit better with the possible future work of using |
Split off #788 for possible future refactoring. |
Merged via #789 Thank you!! |
Fixes #755. Related to #183.
On my computer, it’s roughly 2.5 times faster! 🎉
main
refers to commit 1557892.Tested on a code base of this size:
Computer specs:
Terminal:
elm-format --yes .
(without>/dev/null
) depends on your Terminal. With the default Apple Terminal, I got 3.3 seconds as shown in the table above. With iTerm2, I got 5.5 seconds (and 9.7 seconds formain
).Notes:
InfoFormatter
works. Sorry if that doesn’t fit with your vision for it!World.mapMConcurrently
(a one-liner) though, so it might be easy to replace by someone better at Haskell.