Sublime Forum

High CPU/GPU usage for certain projects

#1

Opening certain projects in Sublime Text seem to cause high CPU usage and peg drawing at 60 FPS, for some reason. Inspection using sample shows that it’s stuck rendering Skia controls or in OpenGL goop, depending on which project I open.

I have looked at Build 3208 performance regression, but this issue has persisted for every build since 3179. I’m running macOS Mojave 10.14.5 (18F127a) on a MacBook Pro (Retina, 13-inch, Early 2015). I can’t seem to attach the projects or sample here, but I can mirror them somewhere if that’d help.

0 Likes

#2

I noticed the same problem. I dunno if something changed with indexing the files though.

However, I solved adding

"index_exclude_patterns": [
	"*/node_modules/*"
]

in the settings.

With all this transpilation made with Babel, from all of these new Javascript frameworks and libraries, the NPM node_modules folder becomes insanely big in proportion to how much benefit we usually get from those JS libraries.
In my case I do not need the GoTo functionality of Sublime, on the files from my dependencies, since I develop none of those and if I want to debug I just go directly where I want; I don’t need the Sublime fuzzy search to retrieve files there inside.
So for me is a good compromise here (that, e.g., I am not willing to do with the PHP Composer vendor/ directory, where I actually have libraries that I work on and where I want to have the GoTo fuzzy search that is based on files being indexed).

I believe you have a similar problem of “too many files to index” like me, leading to high CPU use.
Also, every time you perform a save on a single file listed in the sidebar, the indexing will reset and restart from scratch, dropping all the indexing already done. So you might want to wait for the indexing to finish, before doing any work on the files; that could speed up the indexing and probably end up the hassle with the high CPU.

0 Likes