parsonsmatt/intero-neovim

Enable -fobject-code by default

Opened this issue · 1 comments

Chris Done helpfully pointed out that enabling -fobject-code will potentially alleviate the performance problems I've noticed with intero-neovim:

Intero on Stack's 36Kline codebase works fine. You can prove this by opening some X.hs module with one line in it and see that it gives immediate feedback.

The only reason it would suffer is if you didn't use -fobject-code which only rebuilds modules that changed (and therefore only collects type information for each module). I did a quick grep of intero-neovim and didn't see that enabled by default.

-fno-code like used in ghcid is fast for one file but falls over on big projects, esp. with a big module at the top of the dependency tree, because it reloads everything every time. (source)

  • Find some way of measuring performance -- the stack repo is likely a good candidate
  • Enable -fobject-code in the REPL before passing control to the user
  • If it is faster, then we're golden

Additionally, we should enable :set +c for the GHCi backend, as many intero-ish features won't work without that.