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

Performence issue with large elm files #182

Open
miltonio94 opened this issue Feb 2, 2022 · 4 comments
Open

Performence issue with large elm files #182

miltonio94 opened this issue Feb 2, 2022 · 4 comments

Comments

@miltonio94
Copy link

Hello,
I've been having some big performance issues with elm mode in large files. I have noticed it be particularly bad in one file in specific that is 11737 lines long. The weird thing is that it doesn't happen at all times, but the auto-indenting completely stalls emacs for seconds. I have not been able to identify what triggers it. At first, I thought it was because of me being on a zoom call or a slack call, but I get the problem even when I'm not under those circumstances.
My work machine (where I have been having this issue) is no slouch either. It has an i7 and 42Gb of RAM.
I use this package with doom emacs at the moment.

I'm new to writing issues so if anything isn't up to scratch, let me know.

@purcell
Copy link
Collaborator

purcell commented Feb 8, 2022

Is that auto-indenting with elm-format (e.g. when you save), or you mean using the Emacs commands (e.g. mark whole buffer, reindent)?

@miltonio94
Copy link
Author

miltonio94 commented Apr 7, 2022

yeah, on save with elm-format, it also happens when i run just the command. It keeps giving me a timeout error. I thought this was due to the size of the file, but when i run the elm-format command from the terminal it runs it fine on these large files in less than a second without any hangup. (sorry it took some time to reply, i missed the notification). I have also noticed that this happens on most files that have more than 1k lines of code, and this is after doing all the little optimization tips and tricks recommended by the lsp

@purcell
Copy link
Collaborator

purcell commented Apr 8, 2022

Thanks. Would you mind sharing which emacs version you're using?

@miltonio94
Copy link
Author

I found the issue originally on emacs 27, I'm currently using 29.0.5 which has had a slight performance boost for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants