-
-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
haskell-language-server starts up slowly #3578
Comments
Note that the build invoked by HLS uses a different build directory. So the key question here is, is HLS' first startup any slower than a cold (I have been investigating this sort of thing. See e.g. haskell/cabal#9302 (reply in thread). It's pretty crucial for stuff like #3595 and #155 that Cabal doesn't do more work than necessary when reloading.) |
@georgefst A cold |
Looking at the logs of HLS, there are roughly four calls to
The former three are relatively fast on a warm build but just as slow as Moreover, it looks like HLS we might invoke cabal sometimes redundantly, but I haven't investigated.
But only a subset of the command should be really required. Maybe this info is also interesting to figure out what is going on. |
Is your enhancement request related to a problem? Please describe.
I've set up a no-op project with the following files:
With a warm build, that is, after a
cabal build
at the command line, followed by an opening and closing ofFoo.hs
once (after letting haskell-language-server initialize), I observe the following timings upon openingFoo.hs
:where "processing" and "setting up" occur in parallel after "initializing" is complete.
"Initializing" here is the time between the client sending the "initialize" RPC request to haskell-language server and receiving a response.
"Processing" and "setting up" are just what haskell-language-server is reporting it's doing via progress handlers.
Describe the solution you'd like
Well, I'd like this to go much faster :) Or, at least, I wanted to draw attention to the slow startup time, in case it was not yet on anyone's radar who might be able to diagnose and improve.
Thanks!
The text was updated successfully, but these errors were encountered: