Sublime Forum

High CPU usage on Mac Sierra with 3143

#1

My CPU usage just keeps climbing until i have to shut down Sublime. It’s been this way for a good number of prior builds, i just figured with the exit from beta it would be resolved but this is not the case. It’s unusable. Going to try and track down the previous beta that still works.

1 Like

#2

Probably a plugin, assuming it isn’t the indexer doing its normal thing. Trying reverting to a freshly installed state and see if you still have a CPU usage problem.

1 Like

#3

I noticed this with the touchbar features enabled and a large (>100) number of files open. Disabling the touchbar features in sublime fixed the issue for me.

1 Like

#4

@djspiewak - where do you go to disable the touchbar features? Are you referring to the “show_navigation_bar” setting?

0 Likes

#5

Just did a full reset of Sublime - will start adding plugins back one by one and see if the issue comes back.

0 Likes

#6

OK - at this point it seems like the “A File Icon” package (recommended as part of the Material Theme) may have been the culprit. Will continue to monitor.

0 Likes

#7

Is 18% CPU when editor is idle considered normal? I have 3 projects open and the cpu is pretty steady between 17 and 20%).

https://goo.gl/CsCZvF

0 Likes

#8

getting frequent intermmittent CPU spikes (multiple processes running at 99%). I have added some plugins back in now. will try experimenting with removing some again. I currently have:

  • Less
  • Vue Syntax Highlight
  • VueFormatter
  • Git
  • Babel
  • ApacheConf.tmLanguage
  • EJS 2
  • Craft-Twig
  • Laravel Blade Highlighter
  • Swift
  • SublimeLinter
  • SublimeLinter-php
  • SublimeLinter-contrib-stylelint
  • SublimeLinter-contrib-eslint
  • INI
  • JSX
  • MarkdownEditing
  • nginx
  • Nunjucks Syntax
  • Project Manager
  • Sass
  • Stylus
0 Likes

#9

I’m having the same issue. It’s actually quite noticeable when running Netflix on another display. As soon as I updated to ST3, streaming video becomes jerky. As soon as I quit ST3, the video goes back to normal. ST3 also now appears in the “Using Significant Energy” list in my battery drop down.

0 Likes

#10

That’s possible if icon_file_type is missing layer0.opacity, setting to 1.0 for backwards compatibility slow down Sublime Text. I’ll fix that with the next A File Icon version.

Workaround here:

https://github.com/ihodev/a-file-icon/issues/133#issuecomment-329373731

The same situation with Boxy Theme:

https://github.com/ihodev/sublime-boxy/issues/189

Currently, I’m working on the new theme and I hope I’ll release first beta in the near time. After that I’ll start working on the new version of A File Icon.

1 Like

#11

If there are multiple processes, it sounds like the indexer is indexing your source code. Perhaps check out the Help > Indexing Status… menu entry. Once it has finished going through everything, the background processes will close. You can control how many are used via the index_workers setting.

0 Likes

#12

Besides removing the packages, did you try to delete the Data/Cache folder? Maybe some malformed cache files exist within that folder, which cause trouble.

I got used to clear that folder from time to time as it seems to grow constantly over the months.

0 Likes

#13

@deathaxe - yes i deleted the data folder.

0 Likes

#14

@wbond - i checked the indexer and even with the indexer idle it’s still using 10-20% CPU which is really odd compared to the 0.3% that PHPStorm is using given that PHPStorm is a more full-featured IDE.

https://goo.gl/4y5Pg5

0 Likes

#15

Mine hovers around 3% with multiple project windows open. I believe this is mostly due to cursor animation. When not focused I am at 1.0% or less.

There must be something else going on. It looks like you have a number of packages installed. Do you see the CPU usage with them all removed?

0 Likes

#16

i’ll experiment with removing the packages again.

question on indexing - should the same project be getting re-indexed every time i open it (that is what is happening)? It seems like the index should be cached.

Hmm - ok not every time but definitely more than once without making any changes to the files.

0 Likes

#17

Hmm - it seems like Material Theme + some other condition may be the issue. Going to switch to a different theme for a while and see how that goes.

0 Likes

#18

If some plugin is dynamically changing/creating/generation syntaxes files on the fly, it will cause sublime text to trigger the indexer frequently. I had one plugin which does this, but I added a check to stop the plugin doing that when there are projects opened, so the index will not keep triggering every time:

  1. https://github.com/evandrocoan/SublimeAMXX_Editor/blob/a3fee90a70184d3726126b8b8e55b00e51352648/AMXXEditor.py#L980-L1015

If you have some plugin doing such, you will need to find out which one is doing it, then disable or fix it. Perhaps an issue on its issue tracker.

0 Likes

#19

Definitely looks like the issue was Material Theme. For some reason the maintainer of that project keeps closing tickets related to this issue so just switched to another theme and not having issues anymore.

1 Like

#20

Tried to explain the issue to him.

0 Likes