Sublime Forum

Sporadic CPU Usage

#1

The CPU usage with ST3 has been unusually high. It fluctuates between 30% and 90% pretty much all day long. I’ve been careful to give it grace while it’s indexing a project, but this goes on long after that’s done. Heck, even with all the Sublime windows closed, it’s still buzzing around 40%.

I’ve seen several posts on here about unusual amounts of CPU usage, but almost all those posts go something like:

[quote]“Hey sometimes sublime spikes”
“It indexes projects now”
“Oh ok, cool. Thanks!”[/quote]

I’ve waited a while before posting this, and I’m quite certain this is a different issue. I don’t know off the top of my head what information is going to be most valuable to you, so just ask me any questions you have, or any diagnostics you want me to report and I’ll be happy to do it.

I’m on OSX Mountain Lion running ST3 build 3021.

Thanks!

0 Likes

#2

When Sublime Text indexes files, it spawns child processes to do the actual indexing, so you should never see high CPU usage in the main process from this. You can see if it is indexing related by either disabling indexing via the index_files setting, or entering sublime.log_indexing(True) in the console to get informed of when indexing happens. Furthermore, when indexing is happening you’ll see a percent complete indicator in the status bar.

There were scenarios where indexing could use an inappropriate amount of CPU time, but these should all be solved in 3021.

Assuming it’s not indexing related, then it’s almost certainly triggered by a plugin. While plugins all run within the plugin_host process, they will also cause the main process to consume CPU every time they make an API call. You can verify if it’s plugin related via following these instructions: sublimetext.com/docs/3/revert.html

0 Likes

#3

Yep that completely fixed it. So I just need to go through and remove plugins one by one and see which one seems to be the issue?

0 Likes

#4

Opened the console and found a lot of plugins I had from ST2 were getting syntax errors. I removed all the ones that were squawking, so that should probably fix it then. Thanks so much for your help! And thanks for building an awesome product!

0 Likes