Performance drops exponentially with deeply nested lists
kraklin opened this issue · 2 comments
Hey,
we have found a possible performance bug with our code - one of our BE engineers copy/pasted deeply nested HTML structure and suddenly the elm-format takes 20s on 500 lines file. We were able to narrow the problem to having deeply nested lists - I have created SSCCE for it here:
https://github.com/kraklin/elm-format-nesting-bug-sscce
Current way around is to split those deeply nested lists into several functions once it exceeds cca 10 levels of nested lists.
Latest version - 0.8.5 it is fixed in the elm-tooling in the SSCCE repository.
Regarding the other problems - this is replicable with lists of one element containing list of one element... so I'd say the length of the list or size of the file does not play any role with this one.