Sublime Forum

High CPU usage on Mac Sierra with 3143

#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

#36

Hi wbond. Actually I have let it opened for more than 30 minutes and the energy impact is still same, it also happens when i’m using de default theme.

The 3 minutes that I have talked about is related to how much time is possible to track on the bottom gauge from Activity Monitor.

My project is all indexed by ST3 which does not needed to index anything more after opened.

This is sooooooo mysterious. :cry: I really want the ST3 back.

0 Likes

#37

I just noticed you are running an unregistered copy, so build 3143. For some reason I was thinking you were on 3154.

We’ve definitely made a number of performance and memory improvements in the current dev cycle. I supposed since you don’t have a license you’ll have to wait for the next stable release to see the results.

0 Likes

#38

My concern is about buying a license and get the same issue on Dev Build 3154.
I know that here is not the topic but would be nice to know how ease is to get refund if it persists on the Dev Build?

0 Likes

#39

I get a significant improvement turning of the “gpu_window_buffer”. Now it looks perfect, no more High Energy Impact.

1 Like

100% usage all the time
#40

Chiming in, my ST3 build 3143 is consistently using 40-50% CPU.
Fresh install of Mac OS 10.13.1, High Sierra.

Running theme DA:UI

Installed packages are,

0 Likes

#41

add this in your settings: "gpu_window_buffer": false, I’m also using DA UI Theme and now it is working like a charm, no more Energy Impact anymore.

1 Like

#42

this problem is very serious , I can hear my mac screaming when I open sublime text3

0 Likes

#43

Unfortunately we still haven’t been able to reproduce this issue. It seems that it is only affecting some user’s configurations. I’ve tried various steps that users have reported to reproduce the issue, but I have been unable to. This leads me to believe the issue is somehow a combination of user configuration and/or hardware.

For everyone who is seeing this issue, could you reply with the following template of information:

  • Sublime Text Build: (e.g. 3143, 3154)
  • Hardware: (e.g. 2016 MacBook Pro w/ Touchar, external 4k display)
  • macOS version: (e.g. 10.12, 10.13)
  • Theme: (e.g. Adaptive, DA, Material, Default)
  • Does the "gpu_window_buffer": false setting help: (e.g. Yes, No)
  • Is the indexer running: (e.g. Yes, No)
  • Does the problem only occur with files open: (e.g. Yes, No)
0 Likes

#44

@wbond,

MacBook Pro (Retina, 15-inch, Mid 2014)
processor:  2.5 GHz Intel Core i7
OS: 10.13.1 (17B48)
Theme: DA
Does the "gpu_window_buffer": false setting help?  no

Is the indexer running?  yes
Does the problem only occur with files open? no

Sublime text3 : 3154

0 Likes

#45

This was an issue with Material Theme for me as well. https://github.com/equinusocio/material-theme

Since this theme is no longer maintained but is one of the most popular themes it might make sense for Sublime to maintain this theme and make it part of the editor.

After switching to VS Code for a couple weeks because of this issue I could not disagree more with the statement on that repo. “This project is not more under active development. Since Sublime Text is an obsolete software compared to other editors”. Issues like this high cpu usage makes sublimetext unusable and for a daily editor that’s not good.

Thanks

0 Likes

#46

I am working on resolving the issue. Here is some more info:

  1. It is a bug in OS X/macOS when using NSOpenGLView combined with a NSFullSizeContentViewWindowMask and your machine switches graphics cards
  2. Unfortunately there doesn’t seem to be a way for us to work around this, so we are having to heavily change the graphics pipeline on macs.
  3. It only happens when you use a theme with the colored title bar and your machine switches from dedicated to integrated graphics, or vice versa
  4. You can work around it by using the Default theme (or any other theme without a colored title bar) or restarting Sublime Text after your machine switches graphics cards.
4 Likes

#47

This is very interesting. I’ll switch to Default for now to avoid the issue. It’s a shame that Apple hasn’t spoken up about the bug.

0 Likes

#48

One of the side effects is that the window also doesn’t call the update method, which can lead to a black or yellow window. That we can use a different notification mechanism to work around, however we weren’t able to come up with a way to avoid the increased CPU usage after the switch.

0 Likes

#49

Ahhhh! I noticed the yellow bug a while back and wondered what caused it. Fascinating.

0 Likes

#50

Worth mentioning: I doubt it has something to do with switching GPUs (I don’t have a dedicated GPU). I think it has something to do with file permissions, as this started happening after I let Disk Utility do a verify and fix on my SSD.
After completely removing Sublime Text (with AppZapper, so all preferences/caches are removed as well) and reinstalling from download, it’s still happening.

0 Likes

#51

Your issue sounds like it is different. We’ve reproduced the CPU issue from GPU switching when the user is using a theme with a colored titled bar.

In your case I’d recommend opening a new topic and including info like:

  1. Does it happen when you have no folders open
  2. Is the indexer running
  3. Provide a process sample via the Activity Monitor (select the Sublime Text process, click the arrow next to the gear button and pick “Sample Process”)
0 Likes

#52

Hi,

I have the same problem and the problem appends when I select to open my personal folder (many files on it).

Thanks

0 Likes

#53

This sounds like a separate issue. My guess would be the indexer has a lot of files to index, and that is what is using the CPU.

0 Likes