ghc-imported-from
ghc-imported-from copied to clipboard
Slow operation
It sometimes takes 2-3 seconds on my machine to find the Haddock page for a particular symbol. Is this normal?
Perhaps some of the information that cabal repl
provides to ghc-imported-from
could be printed in the output, and then passed as command-line arguments to subsequent invocations? This would let editors cache the information on a per-buffer basis.
Or, alternatively, perhaps this could eventually be folded back into ghc-mod, which already caches all that information?
The slow operation is normal. Earlier versions were much slower. It does no caching at all and has to partially compile the file (to work out the imports and what symbols really mean) at every invocation. If GHC itself kept some more bookkeeping around then lookups would be very quick.
I'd be happy for ghc-imported-from to be merged into ghc-mod. I thought I'd see if the tool gains any traction before talking to the ghc-mod author.
My understanding is that if it were integrated into ghc-mod as a new command, then the bookkeeping would already be done by the ghc-modi process, right? If so, I'd encourage you to merge it in sooner rather than later, as it would make both tools much more valuable.
My understanding is that if it were integrated into ghc-mod as a new command, then the bookkeeping would already be done by the ghc-modi process, right?
I think so. I'll look into it.
@carlohamalainen I'd be happy to merge this (±some cleanup) into ghc-mod if you want to shoot us a PR :3
@DanielG I'd be happy to merge it in :) What sort of things need to be cleaned up?
Oh just some refactoring and documentation so I can understand what's going on too. Last time I tried I didn't quite get it.