Improve performance
From https://github.com/NixOS/nixfmt/issues/329#issuecomment-3241760401(CC @wolgangwalther)
We currently do run nixfmt as a separate process in the nixpkgs scripts that use hackage2nix / cabal2nix. But doing so on hackage-packages.nix takes 20 seconds.
20 seconds for formatting a single (albeit excessively large) file is obscene. It is time that we finally take benchmarks and performance optimizations more seriously. Unfortunately this requires some advanced Haskell knowledge.
#234 was a first improvement in that direction, CC @MangoIV would you be interested in contributing more optimizations?
Yes I would, but I'm only slowly coming back to open source and I'm not sure how far this will be up my priorities. Could be fun to hack on it during a weekend though :)
I have worked a bit on this and got a 2x speed up with 1/4 of memory usage. I think there's still some low hanging fruit though, will open a draft PR soon.
#350