bcpeinhardt / simplifile

Simple file operations for Gleam that work on all targets (Erlang/Node/Deno)
71 stars 10 forks source link

Improve performance of `get_files` #30

Closed giacomocavalieri closed 3 months ago

giacomocavalieri commented 3 months ago

This PR improves the performance of get_files, the trick was implementing it as a single try_fold to avoid doing several passes on the files list.

I tried it on the Gleam's compiler repo (~40'000 files) and it went down from ~4s to ~2s

bcpeinhardt commented 3 months ago

Fab, thanks @giacomocavalieri !!