atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Enabling the 'linter' support makes errors blazingly fast #192

Open LukaHorvat opened 7 years ago

LukaHorvat commented 7 years ago

So I've randomly stumbled upon the setting today and decided to give it a shot. As expected the errors are shown using the linter package instead of in the custom ide-haskell section. What I didn't expect is the MASSIVE speedup.

Without the option enabled it takes 8 seconds for errors and warnings to show for my project. With it, it takes less than a second. The only downside (beside making the ide-haskell panel kind of redundant) is that some errors are shown as warnings.

How is this possible?

lierdakil commented 7 years ago

There really shouldn't be such a huge difference, unless you have thousands of messages (literally). So if I had to guess, it might be due to ghc-mod or something else (OS?) caching something.

чт, 19 янв. 2017 г., 18:42 Luka Horvat notifications@github.com:

So I've randomly stumbled upon the setting today and decided to give it a shot. As expected the errors are shown using the linter package instead of in the custom ide-haskell section. What I didn't expect is the MASSIVE speedup.

Without the option enabled it takes 8 seconds for errors and warnings to show for my project. With it, it takes less than a second. The only downside (beside making the ide-haskell panel kind of redundant) is that some errors are shown as warnings.

How is this possible?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/atom-haskell/haskell-ghc-mod/issues/192, or mute the thread https://github.com/notifications/unsubscribe-auth/AG8EZnBaDRqI8TgSx8mk6N9i96Pc3Vz7ks5rT4RUgaJpZM4LoQXv .

LukaHorvat commented 7 years ago

My theory is that maybe ghc-mod outputs errors almost immediately but then gets stuck doing something else for a while, and only after it's done the errors get shown.

lierdakil commented 7 years ago

Shouldn't be the case. Messages are sent via UPIInstacne.setMessages, which is immediate. Also, everything that can be async, is, so nothing should block. I will try to test on my end, but caching seems the most likely explanation to me at the moment.