Sublime Forum

High CPU and RAM usage in ST4 and ST3

#1

After reporting this issue (updated), I figured it was likely caused by indexing (edit: it was not indexing). However, it still bothers me.

When I add the C:\repos folder to the Sidebar:

  • it takes roughly 4 minutes to index the repositories
  • it clearly ignores .gitignore content as it indexes node_modules (screenshot below)
  • both ST3 and ST4 take ~1GB RAM

In the gif, each frame is 1s, the highlighted is ST4, the other ST3.

It scans node_modules despite being in .gitignore.

I still want to use indexing, but using 1GB of RAM, high CPU and constant Disk access is unacceptable.
What can I do?

/edit

It was NOT indexing

When the repo folder is NOT added, indexing disabled

After adding the repo folder, still indexing disabled


(I tested both ytdlp and gallery-dl folders, they don’t affect it)

When I remove the repo folder, it goes back after a moment. See in this screenshot that I tried to enable/disable indexing, but the only effect was that it spun two processes and eat my CPU. After disabling it, it had little effect on the growing RAM.

0 Likes

Can someone explain why Sublime Text is using over 70GB of ram?
#2

Regardless indexing being enabled, ST maintains an in-memory catalog of all files of the folders added to side-bar, which is required to drive Goto Anything. This may require some RAM in huge folder structures.

0 Likes

#3

In your project file you should have “node_modules” in your “folder_excclude_patterns” along with anything else you don’t want to include in the sidebar.I usually have the directory that artifacts get built to also included as I don’t want a giant javascript file being indexed.

{
  "folders":
  [
    {
      "folder_exclude_patterns":
      [
        "node_modules",
        "build"
      ],
      "path": "C:\\dev\\whatever"
    }
  ],
}
0 Likes