Ticket #8 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

cache ghc-version-specific info

Reported by: claus Owned by: claus
Priority: major Milestone:
Component: --- Version:
Keywords: Cc:


There is really no reason for every editing session to ask ghc about the languages and options it supports. Cache this info and look it up by version. Only call out to ghc again if the cache is missing or doesn't cover the current ghc version.

Only issue: another file to find a writeable location for, on all platforms..

Oh, now that we use autoload, there should also be no need for both ghc.vim and haskell_doc.vim to query the ghc version (and one of the version-comparison functions could also go!).

All these extraneous calls to ghc noticably slow down startup.

Change History

Changed 7 years ago by haskellmode

  • status changed from new to closed
  • resolution set to fixed

Both done. Supported languages and options for one ghc version are cached in ~/.vim/haskellmode.config (cache only, will be reconstructed if missing or for the wrong GHC version), GHC version code has moved to autoload.

There is more we could cache, especially from haskell_doc.vim, or we could cache information from all GHC versions encountered (for users who regularly use more than one GHC), but at least haskellmode is no longer crawling at startup in the default setup (the slowdown was probably Windows-specific, perhaps OS and security software conspiring to make external process calls expensive, but there is no need to have 4 calls when 2 suffice; we could get that to 1, for getting the GHC version).

Note: See TracTickets for help on using tickets.