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

Performance issues #115

Closed smucode closed 6 years ago

smucode commented 6 years ago

I've had issues with atom performance working with elm for a while. Atom is just really slow, especially when switching tabs for instance. I tried to capture a performance log when switching tabs, and it seems like it's got to do with elmjutsu.

screen shot 2018-04-06 at 15 14 22

I've attached the performance if that helps:

Profile-20180406T151438.json.zip

Not sure what i can do to debug this really.

halohalospecial commented 6 years ago

Hi @smucode, can you give me your Elmjutsu settings?

smucode commented 6 years ago

I have disabled everything but hyperclick.

halohalospecial commented 6 years ago

Have you tried it with just Elmjutsu installed? (You can rename ~/.atom, then restart Atom.) Also, do you have lots of .elm files in the project or huge .elm files?

smucode commented 6 years ago

I still experience the problem with only elmjutsu, language-elm and atom-ide-ui. When i cmd+click a around, atom freezes and the profiles seems to indicate it's the indexer.

screen shot 2018-04-07 at 11 23 40

With dependencies we have about 1.9k elm files.

halohalospecial commented 6 years ago

How many files do you have in your project (without dependencies)? Was switching tabs still slow with just those packages installed?

smucode commented 6 years ago

About 200 files without dependencies. I haven't experienced slow tab switching, no. I'll update if I experience it again.

halohalospecial commented 6 years ago

Thanks!

As for Hyperclick/Go To Definition, there are cases where it will be slow (related to record fields, IIRC). I'll look at it again when I have time :D

smucode commented 6 years ago

Yeah, i'm having all the same issues. Might be related to some other elm atom plugin i'm using (elm-format, elm-lens, linter-elm-make). Seems to be fairly OK when I restart atom, but after some use I notice ~3-5 second delays switching tabs, navigating the cursor around using the keyboard, selecting lines using the keyboard, and just general usage. The performance profiler always seems to be hinting towards the elmjutsu indexer. When I disable elmjutsu the lag goes away.

halohalospecial commented 6 years ago

If it's not much of a hassle, can you give a screen capture (like a gif or video)? There might be something that's not obvious. You can also send me a direct message on Elm Slack (same username). Thanks!

halohalospecial commented 6 years ago

As discussed on Slack, this is related to the Hyperclick support. The workaround is to uncheck Enable Hyperclick for now. A fix will be available in the next release.

halohalospecial commented 6 years ago

This should be fixed in the latest version (v.8.0.0). Thanks to @smucode for the help in debugging!