LanguageServer.jl
LanguageServer.jl copied to clipboard
LanguageServer is extremely slow to initialize
I have been working on the package https://github.com/JuliaMatrices/BandedMatrices.jl This package usually takes 2-3 minutes to precompile since it ships with precompile.jl and it creates some issues when using LanguageServer.
Details:
If I made any changes to the package and restart the editor (Sublime Text in my case):
Firstly, LanguageServer initializes by linting all the files in the directory. Eventually, it lints this file which contains using BandedMatrices. Since some files have been changed, it will again takes 2-3 minutes to precompile the package. The LanguageServer is not responsive at all until the initialization has done.
I am not sure if there is any solution to this issue, but it has been an issue for me.
Yes, this is kind of a known issue. We really, really need to move away from loading user packages into the language server process at all, not just for these delay issues but also to increase stability etc. @ZacLN and I have a plan that we came up with during juliacon, just the question when we find time to implement it :)
As data, in one case (on my only slightly underpowered laptop), it took 16 minutes for me to have the LanguageServer ready for usage with a specific project (on first use of course).
I think the start-up times are problematically long. As it stands, the language server is the main tool for "ide-like" support in Emacs. I can only imagine similar is true for other text editors. It's slow enough on my fanless laptop, but they are non-trivially long on desktops as well.
Having such a long initialization time can really put someone off from learning the language.
Real data on my laptop with nvim + coc-julia:
- Initializing julia: 40 seconds
- Julia Language Server Indexing packages: 34 seonds
Is this something being worked on? As a new Julia user I have really liked much about the language so far, but the slow initialization (starting julia language server + language server indexing packages) is... 😕
Yes, we are making good progress on getting rid of indexing entirely.
As LS.jl is still painstakingly slow even on good machines, is this issue any further since the last update?
Its taking a lot of time to indexing for me. With two big packages as CairoMakie and DataFrames. ~10 min on windows 10 x64, without an ssd.