halohalospecial / atom-elmjutsu

A bag of tricks for developing with Elm. (Atom package)
https://atom.io/packages/elmjutsu
MIT License
192 stars 24 forks source link

Very slow edit/save on large projects #91

Closed anagrius closed 6 years ago

anagrius commented 6 years ago

We have a project 50k+ lines of Elm. We love Elmjutsu! Atm though we can't use it because it makes editing Elm files, very slow when typing and saving.

I profiled a little and it seems that the getActiveFileTokens in Indexes is one of the major culprits. We would love to use the addon, but right now, it almost makes Atom unusable event on new machines. I will try to do more profiling to see what is going on.

halohalospecial commented 6 years ago

Hi @anagrius, do you think it's because you have lots of files, you have large files, or both? On my machine, it's tolerable on a 4.2K-line file :smile_cat:

halohalospecial commented 6 years ago

Oh, and there are some features that are really slow :sweat_smile: (https://github.com/halohalospecial/atom-elmjutsu#performance-tuning)

amitaibu commented 6 years ago

@halohalospecial awesome package!

on my machine I have also https://atom.io/packages/language-elm for the syntax highlight. When I disabled autocomplete option of language-elm -- elmjitsu became fast again.

amitaibu commented 6 years ago

Care for a PR to add this to the README ?

halohalospecial commented 6 years ago

Sure, @amitaibu :smile:

There's also this note in the README:

It's recommended to uncheck Enable autocomplete of the language-elm package to prevent duplicate suggestions.

amitaibu commented 6 years ago

Oh, sorry I missed it, I was looking for it in the performance tuning. Maybe worth moving it to a more prominent place -- as it's very likely that most users will have language-elm as-well?

halohalospecial commented 6 years ago

@amitaibu, I'll add it to the "Performance Tuning" section. Thanks for the suggestion!

halohalospecial commented 6 years ago

@amitaibu, Elmjutsu will offer to disable language-elm's autocomplete in the next version :smile_cat:

disable-autocomplete

amitaibu commented 6 years ago

Nice one! 😄