0

I have several huge JSON files, each with around half a million rows, they take several Mebibytes on my HDD.

When opening these files in Visual Studio Code, Visual Studio Code causes spikes in RAM and CPU usage:

This is before I opened the files:

enter image description here

When I was about to open one of the files, the file is exactly 16,781,914 bytes and contains 582,325 items:

enter image description here

Immediately after opening the file, Visual Studio Code uses up to 80% CPU and more than 1 GiB RAM:

enter image description here

After a short while the CPU usage drops, but the RAM usage doesn't:

enter image description here

In contrast, I have opened the same file in Notepad.exe at the same time, and it uses negligible amount of resources compared to Visual Studio code.

How to prevent Visual Studio Code from hogging resources when opening huge JSON files?

Ξένη Γήινος
  • 2,181
  • 1
  • 9
  • 35
  • 4
    I don't know if I follow this question @Alien Earth. If VSCode is a memory hog, what can a user do about it (other than using a different program)? – Mark Jul 28 '23 at 08:26
  • `vim` uses block loading of huge files or maybe all files – rioV8 Jul 28 '23 at 08:36
  • 3
    To me the 1gig vs code is using doesn't seem that unusual, depending on what extensions you have running. Maybe check this answer out: https://stackoverflow.com/a/53663489/7940551 for more help on how to find out exactly what is using your ram inside of vs code. – Barbarian772 Jul 28 '23 at 08:47

0 Answers0