I don’t quite know if that’s a Julia issue or a general VS Code issue. So let me explain the behaviour:
I open VS Code and therein a Julia script. I do Shift + Enter to execute a line and then I have to wait for minutes for this execution to occur. First Julia is starting but that’s quite quick. Then I get yellow squiggly lines below all Julia functions and then the line is executed.
To me this sounds like VS Code is trying to reference all the files in the workspace. And because I have >1000 Julia files it just takes that long. Note that I cannot reduce the number of files as they are autogenerated by another program (… I know…).
So, how that I speed this up? Can I tell VS Code (or is it the Julia linter) to not check all the files in the workspace?
I experienced the same problem with a project that was in a remote unit, and copying the project folder into the local disk solved the problem for me. As a side note, I needed to keep the project in the remote unit too, so I converted both folders into “working trees” of a shared git repository, to avoid errors in my updating them.
In my case at least, I doubt the problem was the number of files. For some reason, it was indexing some packages of the project environment what took a lot of time. You can check where is the issue by looking into the log of the Julia Language Server (in the tab “OUTPUT” of the terminal, and looking for the Julia Language Server in the dropdown menu). There you will see what is taking more time.
I am just not using the Julia terminal of VSCode. I just use the normal (bash) terminal and start Julia from there, using julia --project, and then run scripts using include("myscript.jl")…
I understand that this might be less convenient, but it is more reliable (and allows me to script the start of Julia)…
I do also work in a Microsoft OneDrive folder however all files and folders are set to “Always keep on this device”.
The Julia Language Server takes most time on:
[ Info: Starting LS at 1713769437
[ Info: Downloading cache files...
and at the end the timings are:
============== Startup timings ==============
0.0 - LS startup started (0.0s since last event)
0.01 - connection established (0.01s since last event)
0.142 - (async) listening to client events (0.132s since last event)
0.192 - (async) listening to symbol server events (0.05s since last event)
0.192 - starting combined listener (0.0s since last event)
0.24 - LSP/initialize (0.048s since last event)
1.705 - LSP/initialized (1.465s since last event)
119.39 - LSP/textDocument/didOpen (117.69s since last event)
119.69 - LSP/textDocument/documentSymbol (0.292s since last event)
120.0 - LSP/textDocument/codeAction (0.31s since last event)
120.65 - LSP/textDocument/documentLink (0.65s since last event)
120.83 - LSP/textDocument/inlayHint (0.185s since last event)
121.12 - LSP/textDocument/documentSymbol (0.293s since last event)
121.13 - LSP/textDocument/documentHighlight (0.0010002s since last event)
121.21 - LSP/julia/getModuleAt (0.083s since last event)
121.31 - LSP/textDocument/codeAction (0.103s since last event)
121.31 - LSP/$/cancelRequest (0.0s since last event)
121.33 - LSP/$/cancelRequest (0.02s since last event)
121.33 - LSP/textDocument/documentHighlight (0.0s since last event)
121.33 - LSP/julia/getModuleAt (0.0010002s since last event)
121.33 - LSP/textDocument/codeAction (0.0s since last event)
121.33 - LSP/$/cancelRequest (0.0s since last event)
121.33 - LSP/$/cancelRequest (0.0s since last event)
121.33 - LSP/textDocument/inlayHint (0.0s since last event)
121.33 - LSP/textDocument/inlayHint (0.0s since last event)
121.33 - LSP/$/cancelRequest (0.0s since last event)
121.33 - LSP/textDocument/inlayHint (0.0s since last event)
121.33 - LSP/textDocument/inlayHint (0.0s since last event)
121.33 - LSP/$/cancelRequest (0.0s since last event)
121.33 - LSP/textDocument/inlayHint (0.0s since last event)
121.33 - LSP/textDocument/hover (0.0s since last event)
121.48 - LSP/$/cancelRequest (0.15s since last event)
121.48 - LSP/textDocument/hover (0.0s since last event)
121.81 - LSP/$/cancelRequest (0.323s since last event)
121.81 - LSP/textDocument/documentHighlight (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/$/cancelRequest (0.0s since last event)
121.81 - LSP/textDocument/codeAction (0.0s since last event)
121.81 - LSP/$/cancelRequest (0.0s since last event)
121.81 - LSP/textDocument/hover (0.0s since last event)
121.81 - LSP/$/cancelRequest (0.0s since last event)
121.81 - LSP/$/cancelRequest (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/julia/getModuleAt (0.0s since last event)
121.81 - LSP/textDocument/codeAction (0.0s since last event)
121.81 - LSP/$/cancelRequest (0.0s since last event)
121.81 - LSP/textDocument/didChange (0.0s since last event)
122.32 - LSP/$/cancelRequest (0.515s since last event)
122.32 - LSP/julia/getModuleAt (0.0s since last event)
122.32 - LSP/$/cancelRequest (0.0s since last event)
122.32 - LSP/textDocument/codeAction (0.0s since last event)
122.32 - LSP/textDocument/documentSymbol (0.0s since last event)
122.32 - LSP/$/cancelRequest (0.00099993s since last event)
122.32 - LSP/textDocument/documentSymbol (0.0s since last event)
122.32 - LSP/textDocument/didChange (0.0010002s since last event)
122.33 - LSP/$/cancelRequest (0.0019999s since last event)
122.33 - LSP/julia/getModuleAt (0.0s since last event)
122.33 - LSP/$/cancelRequest (0.0s since last event)
122.33 - LSP/textDocument/didChange (0.0s since last event)
122.33 - LSP/julia/getModuleAt (0.0020001s since last event)
122.33 - LSP/textDocument/codeAction (0.0s since last event)
122.33 - LSP/textDocument/documentSymbol (0.0s since last event)
122.33 - LSP/$/cancelRequest (0.00099993s since last event)
122.33 - LSP/textDocument/documentSymbol (0.0s since last event)
122.33 - LSP/textDocument/inlayHint (0.00099993s since last event)
122.33 - LSP/textDocument/documentLink (0.0s since last event)
122.33 - LSP/julia/getModuleAt (0.0020001s since last event)
122.33 - LSP/$/cancelRequest (0.0s since last event)
122.33 - LSP/textDocument/inlayHint (0.0s since last event)
122.33 - LSP/textDocument/codeAction (0.0s since last event)
122.33 - LSP/$/cancelRequest (0.0s since last event)
122.33 - LSP/textDocument/didChange (0.0s since last event)
122.33 - LSP/$/cancelRequest (0.0020001s since last event)
122.33 - LSP/julia/getModuleAt (0.0s since last event)
122.33 - LSP/$/cancelRequest (0.0s since last event)
122.33 - LSP/textDocument/didChange (0.0s since last event)
122.34 - LSP/julia/getModuleAt (0.0019999s since last event)
122.34 - LSP/textDocument/codeAction (0.0s since last event)
122.34 - LSP/textDocument/didChange (0.0s since last event)
122.34 - LSP/$/cancelRequest (0.0020001s since last event)
122.34 - LSP/julia/getModuleAt (0.0s since last event)
122.34 - LSP/textDocument/codeAction (0.0s since last event)
122.34 - LSP/textDocument/documentSymbol (0.0s since last event)
122.36 - LSP/$/cancelRequest (0.023s since last event)
122.36 - LSP/textDocument/documentSymbol (0.0s since last event)
122.36 - LSP/textDocument/didSave (0.00099993s since last event)
122.4 - LSP/textDocument/inlayHint (0.04s since last event)
122.4 - LSP/textDocument/documentLink (0.0s since last event)
122.4 - LSP/workspace/didChangeWatchedFiles (0.0010002s since last event)
122.56 - LSP/workspace/didChangeWatchedFiles (0.161s since last event)
122.56 - LSP/julia/getModuleAt (0.0010002s since last event)
122.56 - LSP/julia/getModuleAt (0.0s since last event)
122.56 - LSP/textDocument/codeAction (0.0s since last event)
122.56 - LSP/$/cancelRequest (0.0s since last event)
122.57 - LSP/textDocument/codeAction (0.0019999s since last event)
122.57 - LSP/$/cancelRequest (0.0s since last event)
122.58 - LSP/julia/getCurrentBlockRange (0.01s since last event)
122.73 - LSP/julia/getModuleAt (0.154s since last event)
122.98 - LSP/textDocument/codeAction (0.254s since last event)
135.88 - LSP/textDocument/hover (12.898s since last event)
141.23 - symbols received (5.346s since last event)
141.24 - extended methods computed (0.0079999s since last event)
141.24 - project deps computed (0.0s since last event)
141.24 - env map computed (0.0s since last event)
160.69 - initial lint done (19.453s since last event)
=============================================