Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance drops exponentially with deeply nested lists #778

Open
kraklin opened this issue Nov 21, 2022 · 2 comments
Open

Performance drops exponentially with deeply nested lists #778

kraklin opened this issue Nov 21, 2022 · 2 comments
Labels
performance upgraded-parser Issues that are best solved after upgrading to the elm-compiler-0.19 parser
Milestone

Comments

@kraklin
Copy link

kraklin commented Nov 21, 2022

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.

@avh4
Copy link
Owner

avh4 commented Nov 21, 2022

Can you confirm which version of elm-format you're using, so make sure you're not seeing #642 ?

Side-note that this might be similar to #753

@kraklin
Copy link
Author

kraklin commented Nov 21, 2022

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.

@avh4 avh4 added the upgraded-parser Issues that are best solved after upgrading to the elm-compiler-0.19 parser label Feb 11, 2023
@avh4 avh4 added this to the 0.10.0 milestone Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance upgraded-parser Issues that are best solved after upgrading to the elm-compiler-0.19 parser
Projects
None yet
Development

No branches or pull requests

2 participants