# Painfully slow Julia REPL in VSCode

**URL:** <https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013>\
**Category:** VS Code\
**Tags:** repl, vscode\
**Created:** [February 22, 2023, 12:25pm UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013 "2023-02-22T12:25:09Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gian\_Marco\_Todesco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gian_marco_todesco/32/47108_2.png) [@Gian\_Marco\_Todesco](https://discourse.julialang.org/u/Gian_Marco_Todesco)\
**Post date:** [February 22, 2023, 12:25pm UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/1 "2023-02-22T12:25:09Z")

</div>

I started using Julia almost one year ago. I use VSCode (1.75.1) with Julia Language Support (v1.38.2), on Windows 10 Pro.  
I must use Julia 1.6.5 (working on a massive project with a large team). In the beginning, everything was fine: the language is terrific and the IDE is excellent: I can run my scripts with “Execute active file in REPL”, I can type commands on the console and also select snippets and execute them by hitting ctrl-ret.  
In the last few months Julia REPL started to slow down and now is barely usable. Very often the Julia Language Server hangs, for no understandable reason: ctrl-return does not work anymore (in fact it works, but I have to wait 50-80 seconds for any kind of reaction). Sometimes also the “Execute active file in REPL” command seems disabled. In that case, I quit Visual Studio, waiting for the Julia process to stop and then I start again: I have to wait for the slow startup of the Julia Language Server, but then everything seems to work again for a while. Unfortunately after 10-15 minutes, the problem comes back.  
I’ve tried to change the environment, installing only the package I need. This improved the situation for a few days, but after a week the problem started again.

---

<div class="post-metadata">

**Author:** ![Gian\_Marco\_Todesco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gian_marco_todesco/32/47108_2.png) [@Gian\_Marco\_Todesco](https://discourse.julialang.org/u/Gian_Marco_Todesco)\
**Post date:** [March 13, 2023, 11:12am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/2 "2023-03-13T11:12:43Z")

</div>

A small update.  
When the Visual Studio Code Julia REPL hangs, we check the task manager and notice that two Julia processes are running. One of them consumes a lot of CPU. So if we kill that process, the REPL awakes suddenly and for a while everything is fine. Unfortunately, after a few minutes, the problem appears again.

What is that process doing? How do we disable that activity?  
Any comment would be appreciated.

---

<div class="post-metadata">

**Author:** ![robsmith11](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/robsmith11/32/29641_2.png) [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Post date:** [March 13, 2023, 12:46pm UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/3 "2023-03-13T12:46:06Z")

</div>

I haven’t used the Language Server yet, but it certainly sounds like the culprit.

My understanding is that it’s not the most mature piece of the Julia ecosystem, so it may be struggling with larger projects. More recent versions of Julia have improvements to threading that help with interactive tasks, so that might help when you can upgrade in the future.

I’d suggest disabling the Language Server for now, at least until you can confirm whether it’s the problem. And then maybe open an issue with the developers to see if anything can be done.

---

<div class="post-metadata">

**Author:** ![Gian\_Marco\_Todesco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gian_marco_todesco/32/47108_2.png) [@Gian\_Marco\_Todesco](https://discourse.julialang.org/u/Gian_Marco_Todesco)\
**Post date:** [March 21, 2023, 6:49am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/4 "2023-03-21T06:49:00Z")

</div>

Thank you a lot for your answer. If I understand correctly, we cannot “disable the Language Server” if we want to use the Julia console in VSCode. We like the interactivity of Julia’s environment, and it would be a problem to do without it.  
We can run the Julia interpreter from the command line and invoke programs using “include(filename)”, but it takes a lot to start (almost a minute to include all our libraries).  
I’ll try to write in the julia-VS Code thread…

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [March 21, 2023, 7:18am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/5 "2023-03-21T07:18:01Z")

</div>

Have you created an issue on [Issues · julia-vscode/julia-vscode · GitHub](https://github.com/julia-vscode/julia-vscode/issues) ?

My guess here is that the language server is trying to index all the symbols in the packages you have loaded and is getting overwhelmed.

---

<div class="post-metadata">

**Author:** ![Gian\_Marco\_Todesco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gian_marco_todesco/32/47108_2.png) [@Gian\_Marco\_Todesco](https://discourse.julialang.org/u/Gian_Marco_Todesco)\
**Post date:** [March 21, 2023, 7:27am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/6 "2023-03-21T07:27:16Z")

</div>

Thank you for the answer. I’ll create an issue there.  
Your guess is probably correct. Is it possible to disable the indexing somehow?

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [March 21, 2023, 7:30am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/7 "2023-03-21T07:30:58Z")

</div>

See [option to disable language server indexing? · Issue #1638 · julia-vscode/julia-vscode · GitHub](https://github.com/julia-vscode/julia-vscode/issues/1638)

A [comment](https://github.com/julia-vscode/julia-vscode/issues/1638#issuecomment-685093228) there suggests changing the VSCode Julia environment to a dummy environment.

Ping @davidanthoff .

---

<div class="post-metadata">

**Author:** ![Gian\_Marco\_Todesco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gian_marco_todesco/32/47108_2.png) [@Gian\_Marco\_Todesco](https://discourse.julialang.org/u/Gian_Marco_Todesco)\
**Post date:** [March 21, 2023, 7:43am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/8 "2023-03-21T07:43:11Z")

</div>

We’ve already tried. It worked briefly, but the problem reappeared in the dummy environment.

---

<div class="post-metadata">

**Author:** ![jcbritobr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jcbritobr/32/219275_2.png) [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Post date:** [January 24, 2024, 11:10pm UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/9 "2024-01-24T23:10:05Z")

</div>

To be honest this is a critical issue. Its delay my work every day. New versions of julia are caching the compiled information but its far from ideal yet.

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [January 24, 2024, 11:27pm UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/10 "2024-01-24T23:27:25Z")

</div>

> [@jcbritobr](#):
>
> To be honest this is a critical issue.

What, exactly, is a critical issue? The OP isn’t clear about what the issue was, either.

---

<div class="post-metadata">

**Author:** ![jcbritobr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jcbritobr/32/219275_2.png) [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Post date:** [January 25, 2024, 12:03am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/11 "2024-01-25T00:03:33Z")

</div>

Not having a fully functional debugger is clearly a critical issue. Is hard to debug julia code. As we mention above, we had advanced in caching and others features, but debug is still a slowly and a painfull task.

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [January 25, 2024, 12:06am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/12 "2024-01-25T00:06:40Z")

</div>

1. I still don’t know exactly what you’re talking about. The debugger works fine for me.
2. You’re clearly being off-topic, considering that this is the first time the debugger was mentioned here.

---

<div class="post-metadata">

**Author:** ![jcbritobr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jcbritobr/32/219275_2.png) [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Post date:** [January 25, 2024, 12:08am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/13 "2024-01-25T00:08:23Z")

</div>

Im just commenting what was told above in this post. Debugger doesn`t works well for me also because is very slow.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [January 25, 2024, 7:59am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/14 "2024-01-25T07:59:15Z")

</div>

- Are you using [`ALL_MODULES_EXCEPT_MAIN`](https://www.julia-vscode.org/docs/stable/userguide/debugging/#ALL_MODULES_EXCEPT_MAIN) ?
- Are you marking packages that you not debugging to be compiled rather than interpreted?
- Are you using separate environments for each project?

Please see the example for faster debugging here:  
[https://www.julia-vscode.org/docs/stable/userguide/debugging/#Example-for-fast(er)-debugging](https://www.julia-vscode.org/docs/stable/userguide/debugging/#Example-for-fast(er)-debugging)

---

<div class="post-metadata">

**Author:** ![jcbritobr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jcbritobr/32/219275_2.png) [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Post date:** [January 25, 2024, 10:10am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/15 "2024-01-25T10:10:54Z")

</div>

I’m saying its really very slow to debug. Takes lots of times to load and start. Steping to functions is slow, and also, I’m not doing nothing that you said above because I think this must be transparent as a user. We clearly see thats not done yet. Its a issue we needs solve. Precompiling have enhanced, but its not good yet.

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [January 25, 2024, 10:53am UTC](https://discourse.julialang.org/t/painfully-slow-julia-repl-in-vscode/95013/16 "2024-01-25T10:53:21Z")

</div>

> [@Gian\_Marco\_Todesco](#):
>
> I must use Julia 1.6.5 (working on a massive project with a large team).

I’m not sure you must, I would consider latest version, 1.10. I mean even if your code must work on 1.6, the LTS, I suppose that’s the reasoning.

You must then be careful to not use APIs for 1.7+ (the docs always state if only available for certain version or later) and/or test regularly on 1.6, at least before you 1.10 Julia code in putting in production on 1.6.

I don’t know if using 1.10 will fix “slow Julia REPL”, in VSCode, or elsewhere. Julia 1.6 wasn’t slow for me, just in the REPL, but some actions/“TTFX”, could be, that no longer are.

Note 1.10 will most likely become the new LTS, if not possibly 1.9, so you could also rather use it if you want to know for sure all code will work for the future. The 1.6 LTS is going away, I believe soon, i.e. when we get a new one.
