Sublime Forum

High CPU and Memory Usage (Sublime 3 PC/Windows 10)

#21

There is - in the status bar there is a progress percentage that increases over time. If you click it, the indexing status window opens.

0 Likes

#22

Does this happen with a clean install? Perhaps one of your plugins is having an issue? Perhaps see what the Tools > Developer > Profile Plugins menu shows?

1 Like

#23

Hmm, Iā€™ll check and see if I can reproduce this.

0 Likes

#24

@mjc if you exit Sublime Text, then delete the ā€œ~/Library/Application Support/Sublime Text 3/Indexā€ folder, and then open it up again, does the problem go away?

That will force all files to be indexed again, so there will be some work done at startup, but I wonder if things will be working well after that. The index format changed between 3.0 and 3.1, and perhaps Sublime Text is trying to parse the old index data when it shouldnā€™t be.

1 Like

#25

Thanks all for the advice. I solved the problem.

I have a habit of creating anonymous workspaces and relying on the fact that Sublime Text will remember them when I quit and reopen Sublime Text.

I went through every open workspace and did ā€œSave Workspace Asā€¦ā€. The system was crawling while I did this, and there was no indication that Sublime Text was indexing. In any case, this took me a few minutes, as I got the macOS spinning ball after saving and closing each workspace. It turned out I had 14 windows/workspaces open so it took about 15 minutes. After this was done, I quit and re-open Sublime Text and opened just 3 of the workspaces and everything was fine.

I like to have many workspaces open, even ones that Iā€™m not actively working on, because Alt-Tabbing through them reminds me of all things that need attention at some point. i.e. they hold my context for the various projects Iā€™m working onā€¦

I suspect there is some background task outside of indexing that is not reporting its status in the Indexing status window, possibly when upgrading from an earlier build of Sublime Text to build 3170. I noticed after opening a new workspace that if I added a directory to it, that the icon was animated suggesting indexing activity. These animations were not present on the workspaces that were restored from the earlier version of Sublime Text that I upgraded from. i.e. this issue was possibly related to upgrading workspaces and some interaction with the indexer.

All is good now.

0 Likes

#26

@wbond Iā€™ll look out for the indexing status in the status bar next time, however, the indexing status was not apparent to me. I did notice that when I added a new directory to a project, that its icon was animated, suggesting indexing. However, this didnā€™t show up on any of the old projects prior to the upgrade, even though I knew indexing was happening (via Help -> Indexing Statusā€¦ ). Is this animation visible on all status bars? (I had 14 workspaces open) or is it just visible on the workspace that is being indexed?

0 Likes

#27

I know the thread is quite old, but I had just had the same issue where Sublime was using 100% ! of the CPU of my new Alienware R2ā€¦ luckily I tried adding ā€˜node_modulesā€™ to the ā€œindex_exclude_patternsā€ list and the CPU usage immediately dropped to 0%! Hope that helps any JS devs out there :joy:

0 Likes

#28

Looks like this is the problem I am facing also. Where can I change the index_exclude_patterns list?
Tried on the file *.sublime-project sth like this:

{
	"folders":
	[
		{
			"path": "D:\\sth\\project\\project-name",
      "index_exclude_patterns": "node_modules"
		}
	]
}

but does not work. Do I place it wrongly?

0 Likes

#29

Thatā€™s the correct place to add it, yes. There is also a preference of the same name you can set in your user preferences to make the change global everywhere instead of just on a project by project basis if youā€™d like to do that.

In both cases, the value of the setting needs to be a list of items, but youā€™ve provided it as a single string. Editing that line to read as follows may resolve that issue for you (i.e. add square brackets to the value to make it a list):

"index_exclude_patterns": ["node_modules"]
0 Likes