elm-format
elm-format copied to clipboard
Formatting deeply nested lists is slow
Formatting the following program takes a bit over 6 seconds on my machine:
x =
[ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ]
If I add another nested list, it takes about 12 seconds:
x =
[ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ]
This slowness showed up in real life code with HTML nested 14 or so levels deep.