Is it normal for the Julia language server to take ~20 s to start up?

Hi everyone. I’m new to Julia and language servers. I’ve set up Eglot with eglot-jl and it seems to be working fine. The only thing that’s off is that Eglot takes 15 to 30 s to start up. It’s not a big deal but it got me wondering if I misconfigured something.

I’m running Emacs 30.0.50 with the latest version of the packages as of yesterday. My emacs config goes like this:

;; LSP

(setq eglot-connect-timeout 60)
(setq eglot-autoshutdown t)
(setq eglot-ignored-server-capabilities '(:documentHighlightProvider))

;; Adapted from trev-dev’s configuration on https://github.com/joaotavora/eglot/discussions/993
(with-eval-after-load 'eglot
  (define-key eglot-mode-map (kbd "C-c p D") #'eglot-find-typeDefinition)
  (define-key eglot-mode-map (kbd "C-c p d") #'eglot-find-declaration)
  (define-key eglot-mode-map (kbd "C-c p i") #'eglot-find-implementation)
  (define-key eglot-mode-map (kbd "C-c p r") #'eglot-rename)
  (define-key eglot-mode-map (kbd "C-c p f") #'eglot-format)
  (define-key eglot-mode-map (kbd "C-c p F") #'eglot-format-buffer))

;; Julia

(with-eval-after-load 'julia-mode
  (eglot-jl-init))

(with-eval-after-load 'julia-repl
  (julia-repl-set-terminal-backend 'vterm))
(setq julia-repl-skip-comments t)

(defun set-up-julia-mode ()
  "Function with customizations for ‘julia-mode’."
  (add-hook 'before-save-hook #'delete-trailing-whitespace
            nil 'local)
  (display-fill-column-indicator-mode)
  (setq-local electric-pair-text-syntax-table
              text-syntax-table)
  (eglot-ensure)
  (julia-repl-mode))

(add-hook 'julia-mode-hook #'set-up-julia-mode)

It’s not unusual that the language server takes a long time to start up, see e.g. this FAQ entry:

That being said, things have dramatically improved lately, especially with new Julia versions. What version of Julia are you using? Also be aware that start up might especially slow the first time you’re using the language server in a project, or right after you updated something (either Julia or eglot-jl or the language server)

1 Like

Hi @ffevotte, thanks. I have Julia v. 1.9.2. I’ve been configuring Emacs for Julia by tweaking settings and relaunching it always on the same file, so as not to unsettle what had been going on in the background. The first time it did take longer, but after that I was still seeing some

[stderr]  [ Info: Downloading caches...

in the *EGLOT … events* buffer at startup, which got me wondering if caching has some problems.

Also, I was in doubt about when I should call eglot-jl-init. eglot-jl’s readme says that

If eglot-jl-init has been run in your emacs session, running eglot in a julia-mode buffer will start a language server for the Julia project to which the buffer belongs.

so I put it in a (with-eval-after-load 'julia-mode …) form, but I’m not 100% sure about this choice.

IIRC, 1.9 was already faster than previous versions. But I think v1.10 introduced new improvements in terms of startup times.

It might simply be that caching is not finished, but AFAIU this does not prevent the language server to start. It merely reduces its usefulness until all packages are correctly indexed.

It looks like what you’re doing is OK.


If you’re still bothered about startup times, you can try updating everything:

  1. update Julia to v1.10
  2. update the version of LanguageServer.jl internally used by eglot-jl.

There are several ways to update the LanguageServer. If you don’t want to risk breaking your existing installation of eglot-jl, one way could be along the lines of

shell$ mkdir -p some/path/of/your/choosing/eglot-jl-env
shell$ cd some/path/of/your/choosing/eglot-jl-env
shell$ julia --project=. -e 'import Pkg; Pkg.add(["LanguageServer", "SymbolServer"])'

And then in your emacs config:

(setq eglot-jl-language-server-project
      "some/path/of/your/choosing/eglot-jl-env")
1 Like

I am using Doom Emacs and the language server takes ~1-2s to load, 20s seem too much. But Doom Emacs is not using eglot I think.

it suffices to just active the julia support in the .doom.d/init.el file

(doom! 
    # more stuff
    :lang
    (julia +lsp) 
    # more stuff
)

Do you mean 1-2 minutes or seconds?

you can try updating everything

I’m taking note of this and I might go back to it. Not right now because I don’t want to change too many things I don’t understand much about. Thanks again :slight_smile:

The LS should be printing some metrics for startup times, which may help diagnose what’s going on here. 20s until init finishes doesn’t sound particularly unrealistic though.

Yes, if you want hard data to compare to:

In buffer *EGLOT (project-name) events*, you can look for the first request/response exchange between client and server. Look for lines like the following at the beginning of the file:

[internal] Mon Feb  5 13:48:21 2024:
...
[client-request] (id:1) Mon Feb  5 13:48:21 2024:
...
[stderr]   No Changes to `~/.emacs.d/elpa/eglot-jl-20221128.1655/Project.toml`
[stderr]   No Changes to `~/.emacs.d/elpa/eglot-jl-20221128.1655/Manifest.toml`
[stderr] [ Info: Environment successfully resolved
[stderr] ┌ Info: Running language server
[stderr] │   env = "/home/francois/.emacs.d/elpa/eglot-jl-20221128.1655/Project.toml"
[stderr] │   src_path = "......"
[stderr] │   project_path = "......"
[stderr] └   depot_path = ""
[server-reply] (id:1) Mon Feb  5 13:48:25 2024:

Here, it says that eglot itself started at 14:48:21, it sent the first request right away, then the server initialized and sent its first reply at 13:48:25. This means that after 4s the server was responsive (maybe not entirely operational, though).

Now look at the output of M-xeglot-stderr-buffer. Near the end you’ll see a report like:

============== Startup timings ==============
       0.0 - LS startup started (0.0s since last event)
 0.0078921 - connection established (0.0078921s since last event)
  0.062229 - (async) listening to client events (0.054337s since last event)
  0.093183 - (async) listening to symbol server events (0.030954s since last event)
  0.093212 - starting combined listener (2.9087e-5s since last event)
   0.13288 - LSP/initialize (0.039665s since last event)
    1.3817 - LSP/initialized (1.2488s since last event)
    4.5315 - LSP/textDocument/didOpen (3.1498s since last event)
    4.8939 - LSP/textDocument/didOpen (0.36242s since last event)
    4.9523 - LSP/textDocument/didOpen (0.05841s since last event)
    4.9984 - LSP/textDocument/didOpen (0.046067s since last event)
    5.0427 - LSP/workspace/didChangeConfiguration (0.044282s since last event)
    8.9397 - symbols received (3.897s since last event)
    8.9467 - extended methods computed (0.0069768s since last event)
    8.9467 - project deps computed (1.7166e-5s since last event)
     8.947 - env map computed (0.00033784s since last event)
    9.3886 - initial lint done (0.44151s since last event)
=============================================

AFAIU this means it took 9-10s for the Language Server to become fully operational and perform its first linting of the entire project (which is a rather large project, in this instance).

1 Like

I get a lot of errors of this kind,

[ Info: Downloading caches...
┌ Info: Couldn't retrieve cache file for LinearAlgebra.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/L/LinearAlgebra_37e2e46d-f89d-539d-b4ee-838fcccc9c8e/vnothing_nothing.tar.gz

where Eglot spends a lot of time. Also, there’s no Startup timings.

My test file is quite simple, not any project set up and using just Plots (in case that matters).

Here is the full output:

*EGLOT (~/(julia-mode julia-ts-mode)) stderr*
  No Changes to `~/.emacs.d/elpa/eglot-jl-20230601.1335/Project.toml`
  No Changes to `~/.emacs.d/elpa/eglot-jl-20230601.1335/Manifest.toml`
[ Info: Environment successfully resolved
┌ Info: Running language server
│   env = "/home/tokujin/.emacs.d/elpa/eglot-jl-20230601.1335/Project.toml"
│   src_path = "/home/tokujin/src/julia/t/funzioni_col_curry/"
│   project_path = "/home/tokujin/.julia/environments/v1.9"
└   depot_path = ""
[ Info: Downloading caches...
┌ Info: Couldn't retrieve cache file for LinearAlgebra.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/L/LinearAlgebra_37e2e46d-f89d-539d-b4ee-838fcccc9c8e/vnothing_nothing.tar.gz
[ Info: Downloading caches... (3%)
┌ Info: Couldn't retrieve cache file for Dates.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/D/Dates_ade2ca70-3891-5945-98fb-dc099432e06a/vnothing_nothing.tar.gz
[ Info: Downloading caches... (6%)
┌ Info: Couldn't retrieve cache file for TOML.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/T/TOML_fa267f1f-6049-4f14-aa54-33bafae1ed76/v1.0.3_nothing.tar.gz
[ Info: Downloading caches... (9%)
┌ Info: Couldn't retrieve cache file for LibCURL.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/L/LibCURL_b27032c2-a3e7-50c8-80cd-2d36dbcbfd21/v0.6.3_nothing.tar.gz
[ Info: Downloading caches... (12%)
┌ Info: Couldn't retrieve cache file for Markdown.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/M/Markdown_d6f4376e-aef5-505a-96c1-9c027394607a/vnothing_nothing.tar.gz
[ Info: Downloading caches... (16%)
┌ Info: Couldn't retrieve cache file for Mmap.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/M/Mmap_a63ad114-7e13-5084-954f-fe012c677804/vnothing_nothing.tar.gz
[ Info: Downloading caches... (19%)
┌ Info: Couldn't retrieve cache file for LibGit2.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/L/LibGit2_76f85450-5226-5b5a-8eaa-529ad045b433/vnothing_nothing.tar.gz
[ Info: Downloading caches... (22%)
┌ Info: Couldn't retrieve cache file for Logging.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/L/Logging_56ddb016-857b-54e1-b83d-db4d58db5568/vnothing_nothing.tar.gz
[ Info: Downloading caches... (25%)
┌ Info: Couldn't retrieve cache file for Base64.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/B/Base64_2a0f44e3-6c83-55bd-87e4-b1978d98bd5f/vnothing_nothing.tar.gz
[ Info: Downloading caches... (28%)
┌ Info: Couldn't retrieve cache file for REPL.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/R/REPL_3fa0cd96-eef1-5676-8a61-b3b8758bbffb/vnothing_nothing.tar.gz
[ Info: Downloading caches... (31%)
┌ Info: Couldn't retrieve cache file for Downloads.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/D/Downloads_f43a241f-c20a-4ad4-852c-f6b1247861c6/v1.6.0_nothing.tar.gz
[ Info: Downloading caches... (34%)
┌ Info: Couldn't retrieve cache file for ArgTools.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/A/ArgTools_0dad84c5-d112-42e6-8d28-ef12dabb789f/v1.1.1_nothing.tar.gz
[ Info: Downloading caches... (38%)
┌ Info: Couldn't retrieve cache file for Random.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/R/Random_9a3f8284-a2c9-5f02-9a11-845980a1fd5c/vnothing_nothing.tar.gz
[ Info: Downloading caches... (41%)
┌ Info: Couldn't retrieve cache file for Future.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/F/Future_9fa8497b-333b-5362-9e8d-4d0656e87820/vnothing_nothing.tar.gz
[ Info: Downloading caches... (44%)
┌ Info: Couldn't retrieve cache file for SparseArrays.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/S/SparseArrays_2f01184e-e22b-5df5-ae63-d93ebab69eaf/vnothing_nothing.tar.gz
[ Info: Downloading caches... (47%)
┌ Info: Couldn't retrieve cache file for UUIDs.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/U/UUIDs_cf7118a7-6976-5b1a-9a39-7adc72f591a4/vnothing_nothing.tar.gz
[ Info: Downloading caches... (50%)
[ Info: Cloud was unable to cache DelimitedFiles in the past, we won't try to retrieve it again.
[ Info: Downloading caches... (53%)
┌ Info: Couldn't retrieve cache file for Unicode.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/U/Unicode_4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5/vnothing_nothing.tar.gz
[ Info: Downloading caches... (56%)
┌ Info: Couldn't retrieve cache file for Tar.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/T/Tar_a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e/v1.10.0_nothing.tar.gz
[ Info: Downloading caches... (59%)
┌ Info: Couldn't retrieve cache file for InteractiveUtils.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/I/InteractiveUtils_b77e0a4c-d291-57a0-90e8-8db25a27a240/vnothing_nothing.tar.gz
[ Info: Downloading caches... (62%)
┌ Info: Couldn't retrieve cache file for Sockets.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/S/Sockets_6462fe0b-24de-5631-8697-dd941f90decc/vnothing_nothing.tar.gz
[ Info: Downloading caches... (66%)
┌ Info: Couldn't retrieve cache file for Serialization.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/S/Serialization_9e88b42a-f829-5b0c-bbe9-9e923198166b/vnothing_nothing.tar.gz
[ Info: Downloading caches... (69%)
┌ Info: Couldn't retrieve cache file for Printf.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/P/Printf_de0858da-6303-5e67-8744-51eddeeeb8d7/vnothing_nothing.tar.gz
[ Info: Downloading caches... (72%)
┌ Info: Couldn't retrieve cache file for NetworkOptions.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/N/NetworkOptions_ca575930-c2e3-43a9-ace4-1e988b2c1908/v1.2.0_nothing.tar.gz
[ Info: Downloading caches... (75%)
┌ Info: Couldn't retrieve cache file for Test.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/T/Test_8dfed614-e22c-5e08-85e1-65c5234f0b40/vnothing_nothing.tar.gz
[ Info: Downloading caches... (78%)
┌ Info: Couldn't retrieve cache file for Pkg.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/P/Pkg_44cfe95a-1eb2-52ea-b672-e2afdf69b78f/v1.9.2_nothing.tar.gz
[ Info: Downloading caches... (81%)
┌ Info: Couldn't retrieve cache file for Artifacts.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/A/Artifacts_56f22d72-fd6d-98f1-02f0-08ddc0907c33/vnothing_nothing.tar.gz
[ Info: Downloading caches... (84%)
[ Info: Cloud was unable to cache Latexify in the past, we won't try to retrieve it again.
[ Info: Downloading caches... (88%)
┌ Info: Couldn't retrieve cache file for SHA.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/S/SHA_ea8e919c-243c-51af-8825-aaa63cd721ce/v0.7.0_nothing.tar.gz
[ Info: Downloading caches... (91%)
┌ Info: Couldn't retrieve cache file for Statistics.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/S/Statistics_10745b16-79ce-11e8-11f9-7d13ad32a3b2/v1.9.0_nothing.tar.gz
[ Info: Downloading caches... (94%)
┌ Info: Couldn't retrieve cache file for Libdl.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/L/Libdl_8f399da3-3557-5675-b5ff-fb832c97cbdb/vnothing_nothing.tar.gz
[ Info: Downloading caches... (97%)
┌ Info: Couldn't retrieve cache file for FileWatching.
└   exception = RequestError: HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/F/FileWatching_7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee/vnothing_nothing.tar.gz
[ Info: All cache files downloaded. (100%)
[ Info: Loading PhysicalConstants from cache... (0%)
[ Info: Loading Unitful from cache... (0%)
┌ Warning: Dates not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading ConstructionBase from cache... (0%)
┌ Warning: LinearAlgebra not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: Random not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading Roots from cache... (0%)
[ Info: Loading ChainRulesCore from cache... (0%)
[ Info: Loading Compat from cache... (0%)
┌ Warning: UUIDs not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: SparseArrays not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading Setfield from cache... (0%)
[ Info: Loading StaticArraysCore from cache... (0%)
┌ Warning: Future not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading MacroTools from cache... (0%)
┌ Warning: Markdown not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading CommonSolve from cache... (0%)
┌ Warning: Printf not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading Measurements from cache... (0%)
[ Info: Loading RecipesBase from cache... (0%)
[ Info: Loading SnoopPrecompile from cache... (0%)
[ Info: Loading Preferences from cache... (0%)
┌ Warning: TOML not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading Calculus from cache... (0%)
[ Info: Loading Requires from cache... (0%)
[ Info: Loading Plots from cache... (33%)
┌ Warning: Downloads not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: Pkg not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading Showoff from cache... (33%)
[ Info: Loading Grisu from cache... (33%)
[ Info: Loading GR from cache... (33%)
┌ Warning: Tar not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: Test not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: Libdl not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: Serialization not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading HTTP from cache... (33%)
[ Info: Loading URIs from cache... (33%)
[ Info: Loading LoggingExtras from cache... (33%)
┌ Warning: Logging not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading CodecZlib from cache... (33%)
┌ Warning: Zlib_jll not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading TranscodingStreams from cache... (33%)
[ Info: Loading ConcurrentUtilities from cache... (33%)
┌ Warning: Sockets not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: Base64 not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading MbedTLS from cache... (33%)
┌ Warning: MbedTLS_jll not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: MozillaCACerts_jll not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading OpenSSL from cache... (33%)
┌ Warning: OpenSSL_jll not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading BitFlags from cache... (33%)
┌ Warning: NetworkOptions not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading SimpleBufferStream from cache... (33%)
┌ Warning: DelimitedFiles not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading JSON from cache... (33%)
[ Info: Loading Parsers from cache... (33%)
[ Info: Loading PrecompileTools from cache... (33%)
┌ Warning: Mmap not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: Unicode not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: Artifacts not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: GR_jll not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: p7zip_jll not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: Statistics not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading FixedPointNumbers from cache... (33%)
[ Info: Loading JLFzf from cache... (33%)
[ Info: Loading Pipe from cache... (33%)
┌ Warning: REPL not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: fzf_jll not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading Unzip from cache... (33%)
[ Info: Loading RecipesPipeline from cache... (33%)
[ Info: Loading PlotUtils from cache... (33%)
[ Info: Loading ColorSchemes from cache... (33%)
[ Info: Loading ColorTypes from cache... (33%)
[ Info: Loading ColorVectorSpace from cache... (33%)
[ Info: Loading TensorCore from cache... (33%)
[ Info: Loading SpecialFunctions from cache... (33%)
[ Info: Loading IrrationalConstants from cache... (33%)
[ Info: Loading LogExpFunctions from cache... (33%)
[ Info: Loading DocStringExtensions from cache... (33%)
┌ Warning: LibGit2 not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: OpenLibm_jll not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
┌ Warning: OpenSpecFun_jll not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading Colors from cache... (33%)
[ Info: Loading Reexport from cache... (33%)
[ Info: Loading NaNMath from cache... (33%)
[ Info: Loading LaTeXStrings from cache... (33%)
[ Info: Loading StatsBase from cache... (33%)
[ Info: Loading SortingAlgorithms from cache... (33%)
[ Info: Loading DataStructures from cache... (33%)
┌ Warning: InteractiveUtils not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading OrderedCollections from cache... (33%)
[ Info: Loading Missings from cache... (33%)
[ Info: Loading DataAPI from cache... (33%)
[ Info: Loading StatsAPI from cache... (33%)
[ Info: Loading RelocatableFolders from cache... (33%)
┌ Warning: SHA not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading Scratch from cache... (33%)
┌ Warning: Latexify not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading FFMPEG from cache... (33%)
┌ Warning: FFMPEG_jll not stored on disc
└ @ SymbolServer ~/.julia/packages/SymbolServer/LMSFX/src/SymbolServer.jl:247
[ Info: Loading Measures from cache... (33%)
[ Info: Loading UnicodeFun from cache... (33%)
[ Info: Loading PlotThemes from cache... (33%)
[ Info: Loading Contour from cache... (33%)
[ Info: Loading EmacsVterm from cache... (67%)
[ Info: Received new data from Julia Symbol Server.

You might be on an old version of LS.jl and dependencies then. I’d recommend upgrading.

1 Like

Yes, please try upgrading. Either do this

Or upgrade in place (no change needed in you configuration in this case):

shell$ cd /home/tokujin/.emacs.d/elpa/eglot-jl-20230601.1335/
shell$ julia --project=. -e 'import Pkg; Pkg.update()'

(I’ve copied the correct path from your eglot output above)

2 Likes

Now the start up time is down to 8 s :slight_smile: By the way, I measure this time after running emacs my_file.jl, counting the seconds from when the buffer becomes visible to when Eglot’s things show up in the mode line. Now I get the timings. After the second launch:

Startup timings
[stderr]  ============== Startup timings ==============
[stderr]         0.0 - LS startup started (0.0s since last event)
[stderr]    0.016782 - connection established (0.016782s since last event)
[stderr]     0.16407 - (async) listening to client events (0.14728s since last event)
[stderr]     0.23795 - (async) listening to symbol server events (0.073885s since last event)
[stderr]       0.238 - starting combined listener (4.6968e-5s since last event)
[stderr]     0.34248 - LSP/initialize (0.10449s since last event)
[stderr]      3.3328 - LSP/initialized (2.9903s since last event)
[stderr]      7.1672 - LSP/textDocument/didOpen (3.8344s since last event)
[stderr]      9.1428 - LSP/workspace/didChangeConfiguration (1.9756s since last event)
[stderr]      18.193 - symbols received (9.0504s since last event)
[stderr]      18.197 - extended methods computed (0.0039608s since last event)
[stderr]      18.197 - project deps computed (1.812e-5s since last event)
[stderr]      18.197 - env map computed (2.861e-6s since last event)
[stderr]      18.275 - initial lint done (0.078178s since last event)
[stderr]  =============================================

I upgraded this way. Julia is still 1.9.2 (it’s the version in Fedora 39’s repos).

1 Like

I am sorry, my mistake, 1-2 seconds

The start up time will depend on the number of packages to be indexed, doesn’t it?
In my case, times of over 20 seconds are not that unusual. It is worth it, but it would be
nice to see those times decrease more. (I am on 1.10 now.)

Kinda. Package indexing should be async and not stop the more code-local features from working. The main delay here is caused by code loading/init and then parsing and analyzing the workspace, which is blocking.