VSCode Plugin - Minimalist configuration

Hi,

I have a laptop with i5 and 4GB RAM. When I tried to use Julia with VSCode plugin, the CPU utilization went up to near 100% and consumed almost my entire RAM. From what I understand, this because of the package indexing happening (and I have a lot of them in the default project).

All I want from julia plugin is to do are
i. syntax highlighting, and
ii. unicode completion.
If this is my requirement, how should I configure VSCode plugin?
I have turned off all options related to Linter already to avoid any expensive CPU tasks.

Also the julia tasks started for indexing hangs around even when I close VSCode. For now, I am manually killing it every time. Is there a way to change this?

Do you have a baseline for how much of your resources are just taken up by VS Code and not the Julia plugin? I have heard many complaints about VS Code being resource hungry relative to other editors (I use it but I haven’t experienced any slowdown on my machines).

Here are the numbers.
For VSCode, all are with one .jl file open.
VSCode without Julia extension - 115MiB
VSCode with Julia extension - 115MiB (approx)
Julia process started by VSCode - 466MiB
Julia process running indexing - varies, but runs upto 1GiB.
Julia REPL started from terminal with no extra packages 195MiB.

So I think my problem is not from resource utilization of VSCode, but from Julia extension itself.

1 Like

Yea that definitely pinpoints it! As far as I know, the indexing should only really happen once, not every time you start VS Code.

I don’t know of a way to turn off indexing, but I would definitely think it should be a feature if it isn’t yet.

Thanks for the pointers. But my RAM gets easily exhausted and I have to terminate the program even to use the system normally.

Since, there is not direct option to disable indexing, is there any method to index only a particular environment? Then I can point the extension to a blank environment and it should not spend much time on indexing.

Yes, you can configure an environment in your settings, just give it a path to the folder where the Project.toml is located.

We do have plans to do a lot less indexing on user machines, so that should help with the process that does the indexing. Not a short term project, though…

I don’t know whether we can do anything about the 466MB of what I presume is the language server process… We plan to statically compile that code at some point, and maybe we could somehow compile less stuff into that binary, given that we really don’t need that much of the base Julia functionality, but not sure…

The REPL process is just what Julia is: it needs a lot of memory… Not sure whether the core team has plans to somehow reduce that.

Just for comparison I looked at the main memory usage of Python and Julia when I just cold start a REPL on my Windows system: 11.5 MB for Python, 97 MB for Julia…

Thanks.
Creating a blank environment works. :slight_smile: