Sublime Forum

High CPU usage on Mac Sierra with 3143

#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

#21

It was definitely a Material Theme issue. As an alternative to it, I’ve used Boxy theme with following settings: https://gist.github.com/zeshanshani/6b9acff50b106e5356208edda21391b9

With those settings, the look and feel are pretty much same as I had when using Material Theme, but Sublime Text is back to normal now. It’s not even using 1% of CPU (http://s.zeshanahmed.com/a_1F6EC3D2.png) with almost 12 windows opened simultaneously.

2 Likes

Using Sublime with 4k monitor makes macbook slow
#22

FWIW, I ran into this issue after updating last night and don’t have the Material Theme installed or in use. S3’s plugin host seemed to be directly using most of the resources.

I’m curious if everyone who has observed the issue also has SublimeLinter installed, as I suspect the issue might actually be a byproduct of how SL generates a customized copy of user color schemes. Some combination of re-setting my theme and color scheme from the SL-generated version to the original (in my case, this meant setting both from “Lyte-Dark (SL)” to “Lyte-Dark”). Just changing the theme wasn’t enough to fix this for me, so it may be the case that only the scheme needs changing.

This might explain why changing away from Material Theme appeared to fix the issue for some, assuming everyone reporting this solution has SublimeLinter installed.

0 Likes

#23

@abathur Yes, I do have SublimeLinter installed. Here’s the complete list of packages I have installed: https://gist.github.com/zeshanshani/03c3346a915e895f6d419cf801dacb88 - some of them are deactivated including “Material Theme”.

0 Likes

#24

I have sublime linter also.

0 Likes

#25

SublimeLinter seems to be part of the problem. I patched it a few months ago and forgot about it until now.

0 Likes

#26

In any case it would be nice to see some activity on that repo, it’s pretty important to how a lot of people use ST.

0 Likes

#27

For me, it was amCoder Classic theme which was causing issues with this version

0 Likes

#28

You’re right, it is an important plugin to many. It’s performance is pretty bad, and it has lots of issues, but it’s too useful to throw away and any alternatives are just not comparable. I don’t even bother reporting bugs on SublimeLinter. I patched SublimeLinter myself months ago and forgot why I didn’t send a PR until I tried sending some yesterday.

0 Likes

#29

Mac Activity Monitor showed spike from 9% to 31% on 3143 launch
I deleted mac’s Material Theme from Disk and a new version was placed in

Users/username/Library/Application Support Sublime Text 3/Caches

New version puts Sublime Text at 2% after a long pause. During that pause ZenTimer in idle mode jumps from 0.5% to 20%. 3143 behaves like malware. 3126, coming!

0 Likes

#30

Same for me, since 3143 ST never goes below 35% cpu, mostly above 50%–
Indexing status says “idle”, no progress and no messages.

I don’t have the time or motivation to go the “deactivate all plugins”-route.

Think I go back to the last version aswell–

0 Likes

#31

I thought it would be related to themes or others extensions however, it is not.
After a full deep investigation I could seed it is something happening in ST3 last release.

It looks like there are some blaming themes.
I have removed themes like Material Theme or DA UI but the Energy Impact is still high.

My projects are just HTML, CSS, JS with extension sublime-linter jshint.

There is anything from ST3 developers that could tell us about it?

0 Likes

#32

Just to clarify, the high CPU usage persists even when you have all of those extensions (like jshint) disabled?

0 Likes

#33

For sure, even disabling the sublime-lint it still have a high energy impact anyway

0 Likes

#34

Here I would like to share my small benchmarks.

First I have a screenshot of my Sublime opened after 3 minutes. It is pretty to see how the energy impact is affected also, how much time do I have running on Battery (6:05). It is important notice that I’m not using any extension. It is a fresh install.

Now, I would like to share a comparison with VS Code opened almost 5 minutes. Look, I’m not a fan of VS Code, I still would rather the ST3 than Code but, the energy impact makes me wait for a update that could fix this issue to get back to ST3.

In this screenshot it is possible to see how the energy impact it is very low. Also, look at how much time on battery do I have (8:27).

Please guys, it would be so nice that you could bring some improvement related to energy impact on Mac High Sierra.

It is also good to know that ST3 has usage a very low amount of memory, which is so GREAT, when compare with Code. It has used more than 400Mb from ST3.

3 Likes

#35

I’m curious, how many of those 3 minutes were spent indexing your project? If you opened the project fresh, it is going to make an index of every symbol of every project in your file to enable Goto Definition, Show Definition, Goto Symbol in Project, etc. It may be that the energy usage goes down as you give it a little more time. Just a thought.

Also, do you see a difference using the Default theme instead of the Adaptive theme?

0 Likes