avh4 / elm-format

elm-format formats Elm source code according to a standard set of rules based on the official Elm Style Guide
BSD 3-Clause "New" or "Revised" License
1.31k stars 148 forks source link

formatting is slow (~1 minute) for large (~5000 elements) lists #753

Open avh4 opened 2 years ago

avh4 commented 2 years ago

While greatly improved by https://github.com/avh4/elm-format/issues/642, something is still slow for large lists. Two Elm Slack users have noted that files with ~5000 element literal lists can take more than a minute to format.

avh4 commented 2 years ago

help wanted note: At this point, and help starting to debug the problem would be helpful. Here are some possible ideas that might lead to useful information:

avh4 commented 2 years ago

Something else interesting to check would be to try the equivalent source file with gren format on https://github.com/gren-lang/compiler/pull/154/commits/439e38f13188a99ad0b77975e3d3c8dfdba98cf5 since it uses the Elm 0.19 parser -- if that deals with it better, then continuing the conversion of elm-format to the new parser might be the most efficient way to improve this.