Serious issue: Julia language Keyboard Lag Typing Very Slow

PROBLEM

I am writing a long Julia code:

https://github.com/joseph-pollacco/SoilWaterToolbox

After I run Julia code either directly from Visual Studio Code or from the Julia REPL the typing becomes incredibly slow. The lag of typing affects the whole Microsoft Office.
The problem seems to be related when running Julia code and not Visual Studio Code.

VERSION

The problem is independent on the computer (Dell precision or Lenovo computer);

The problem is not caused by updating from Julia version 1.3 from Julia version 1.2, since it was working fine after updates occurs.

I am using Visual Studio Code 1.4.02 but I tried version 1.3 and the problem still persists

I am using Windows 10 Pro.

PACKAGES USING

* BlackBoxOptim
* SpecialFunctions
* Optim
* CSV
* Statistics
* QuadGK
* Suppressor
* Distributed
* Winston

ERROR MESSAGE IN VISUAL STUDIO CODE

The Julia Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted

It is unclear if the problem is due to the update of windows or an update of Julia package

Many thanks for any help you may provide,

Joseph

3 Likes

It is unlikely that this is a problem with Julia per se, probably it is coming from LanguageServer.jl or the VS Code plugin.

It is not clear how to reproduce this, do you need to load the linked package? And then run something (what)?

1 Like

I have seen this problem before (and I have reported on it in a previous thread). There was no solution at the time (several months back).

Presumably a task is taking up too much CPU or RAM. What does the task manager show?

1 Like

If you opened an issue, can you link it?

I thought I did, but I can’t find it.

1 Like

Thanks for your reply as the problem is very frustrating. Do you think that the problem is because I subdivided the code in too many files:

https://github.com/joseph-pollacco/SoilWaterToolbox

I posted the CPU, Memory and disk and to my knowledge the problem does not seem to come from a memory leakage. Please let me know if you would like me to perform more tests?

Thanks for you help,
Joseph :grinning:

The problem occurs even when Visual Studio code is switched off, so my understanding is that it is a pure Julia problem or a Windows problem.

This first screen-shot suggests that it is a vscode issue as the script run by Julia there is from the vscode-julia installation.

What does that look like if you run it outside of vscode? (Make sure to kill all vscode related processes).

1 Like

Below is a snap shot of the Task manager when I run with Julia REPL. When I run the code I could hardly type this message:

This is how I run the code:

include(“d:\Main\MODELS\SOIL\SoilWaterToolbox//START_TOOLBOX.jl”)

I have a complicated code so I am wandering if Julia could handle large soil physics model?

It seems odd that with that kind of load (neither CPU nor RAM is anywhere near 100%) your system is becomes unresponsive. Maybe there is a lot of files being read/written?

Does the “Process Explorer” show anything interesting (when running outside of vscode)?

I’m out of my depth (and I don’t run Windows). But in general, Julia is fine running this size of code.

PS: aside from this issue, you should consider structuring your code in a more Julian way, see https://docs.julialang.org/en/v1/stdlib/Pkg/ and https://julialang.github.io/Pkg.jl/v1/creating-packages/.

1 Like

Found it: The last time I had trouble with VS code it was because of antivirus software: https://github.com/microsoft/vscode/issues/43047

The thing became totally unusable: the lines would scroll by one every three or four seconds. And so on. Apparently, there was no solution at the time, and I must say the prediction that a subsequent release would fix it (or avoid it) came true as the issue went away. Could be that it is back…

3 Likes

Thanks for suggesting that AntiVirus might be a problem. The issue started after Microsoft released a new update. Would anyone suggest how to disable the Antivirus on Windows 10, so I can perform some tests?

I read at the beginning of the program and I write at the end of the program. The csv files read are small 255 kb so I do not believe that this can be an issue.

Thanks for suggesting for writing package will be the final step of the SoilWater-ToolBox.

1 Like

I posted a snapshot of the Task manager above and cannot see anything suspicious :pleading_face:

https://support.microsoft.com/en-us/help/4027187/windows-10-turn-off-antivirus-protection-windows-security

1 Like