atom-haskell / ide-haskell

Haskell IDE plugin for Atom editor
https://atom.io/packages/ide-haskell
Other
233 stars 30 forks source link

2 second freeze on file change #157

Closed rvion closed 8 years ago

rvion commented 8 years ago

When I open a haskell file, atom freeze for ~2 seconds, sometimes more. Is there a way to load files without freezing atom ? or maybe a way to show the file first ?

lierdakil commented 8 years ago

Do you mean this happens only on first hs file opened in session, or on every file?

If it's latter, try disabling haskell-ghc-mod package and check if this delay goes away. If it doesn't help, that's probably syntax tokenizer, not much I can do on my end. If it does, I have a few ideas why. Maybe I could do something about that.

rvion commented 8 years ago

@lierdakil it happens on all files (not necessary big files, but with several local imports) if I disable haskell-ghc-mod and restart atom, the delay goes away. -> it seems to be related to ghc-mod thanks

lierdakil commented 8 years ago

Okay, could you test something else for me? Does this also go away if you disable autocomplete-haskell, while keeping haskell-ghc-mod enabled? (don't forget to restart Atom after disabling/enabling)

rvion commented 8 years ago

This is indeed much faster without autocomplete-haskell. Some of the problematic files are now instant to load. a small delay remain on some files (200/300 ms)

lierdakil commented 8 years ago

This is probably imports parsing. I've made it (more) asynchronous, and added (rather stupid) caching to those. Overall, it should help at least somewhat. Please update to haskell-ghc-mod 1.12.1 and get back to me with results.

rvion commented 8 years ago

that's several times faster than before, thanks

rvion commented 8 years ago

let I close this. I think the file loading time is now really acceptable. not as fast as one could dream, but really ok thanks !