'Visual Studio Code - lagging when typing

I have just installed Visual Studio Code together with the Java Extension Pack. However, when I opened my first file and started typing, the text I type appears after a delay - reaching up even one second.
I have a hunch that it might be due to the number of processes going behind the editor, like real-time syntax checking, autocompletion, code hints et cetera. Perhaps the laptop I am working at simply cannot handle that much. These are the parameters of my current machine:
Processor: Intel(R) Caleron(R) CPU N3350 (1.10 GHz)
RAM: 4 GB

I have another hunch that it may be due to the processor.

So, are there a ways to switch off these facilities like real-time error-checking? If not, what other IDEs for Java could you reccomend? (Apart from Eclipse)



Solution 1:[1]

Had the same problem using Visual Studio Code while using Android Studio along with an Android Simulator in the background, and I run 8GB RAM and a CPU of 3.2GHz but when I returned to Notepad++ (I know its suicidal), to check if it is my problem or because of the IDEs, I typed in real time.

It is due to your processor as Visual Studio Code is not really recommended for "slow" CPUs. Personally I like it, although an IDE in the likes of Vim might suit you better.

Here is a link that might give some more hints: https://github.com/Microsoft/vscode/issues/38409

Solution 2:[2]

The easiest solution I found was to download and install Visual Studio Code Insiders. It's nearly identical except that it's known to lag less. Installing this will also clear any extensions or preferences you have enabled which might be causing the lag:

https://code.visualstudio.com/insiders/

You may also need to run it from the command line with the --disable-gpu flag

code-insiders --disable-gpu

or

/Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/MacOS/Electron --disable-gpu

depending on your OS

Solution 3:[3]

All you have to do disable all extensions and if you have any updates upadte that too...

If it is stil not fixed uninstall and install it again

Solution 4:[4]

Same for me, I often let the computer sleep instead of turn off and kill all processes so it was normal for me that the VS was open for a few days, the solution was to close visual studio and reopen it.

Solution 5:[5]

maybe its the computer performance issue. i am using a laptop.

yesterday i uninstall large program (MS SQl server)

now typing speed back to normal.

Solution 6:[6]

I've now had this problem a number of times. As a matter of fact I just had it right now. What solves it for me is to

  1. Close VS code
  2. Unpin it from my taskbar
  3. Pin it back

It works well after that.

Closing and reopening VS Code has never worked for me

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Efthimis_28
Solution 2
Solution 3 Shajin
Solution 4 Tsvetomir Iliev
Solution 5 wly185
Solution 6 codeogeek