Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sublime 3, cpu usage #537

Closed
sshmyg opened this issue Oct 28, 2014 · 37 comments
Closed

Sublime 3, cpu usage #537

sshmyg opened this issue Oct 28, 2014 · 37 comments

Comments

@sshmyg
Copy link

sshmyg commented Oct 28, 2014

Hello.
Mac OS Yosemite, open sublime text 3 and this is the result http://screencast.com/t/uc7SEM0dv
Reproduce not always.
Sometimes reproducing after plugin installation.
With Mavericks was good.

@Jaspur
Copy link

Jaspur commented Nov 3, 2014

Same here

@FichteFoll FichteFoll added the C: OS MacOS MacOS related issue label Nov 6, 2014
@sshmyg
Copy link
Author

sshmyg commented Nov 12, 2014

Any solution?

@FichteFoll
Copy link
Collaborator

None that I know of. It seems that Yosemite made quite some changes to APIs that Sublime is using and causes a variety of (but mostly performance-related) issues. I don't know how many Yosemite users are affected of these though.

@jdb8
Copy link

jdb8 commented Nov 17, 2014

I'm also having CPU issues. Even after wiping all packages and opening a new window, I get the following:

screen shot 2014-11-17 at 01 18 03

EDIT: another interesting point: after restarting the computer entirely, CPU usage is fine. But over a day of working, at some point it shoots up again for unknown reasons. I'll try and keep monitoring to see if I can notice any pattern to this behaviour.

@stryju
Copy link

stryju commented Nov 19, 2014

not only yosemite is affected - 10.9 here - CPU load skyrockets, sublime gets unresponsive - might be emmet plugin issue tho... (just guessing)

@Miserable-Clown
Copy link

I had this problem on windows 7. I solved it by closing some windows of my current session.
It happened when I updated to Build 3065.

@jdb8
Copy link

jdb8 commented Jan 30, 2015

Update to my issue - it seemed to have fixed itself for a while, but I'm now having the same problems again. I think I've noticed a pattern though: when I have a second user account open (which is also running Sublime) this issue seems to occur. During the period where I had no problems, my second account wasn't signed in. This might explain why restarting entirely works as a fix, since in the process it logs the second user account off.

If I have time, or if anyone else having this problem feels inclined, it might be worth testing whether this is based around having a second OSX account signed in generally, or only when another Sublime process is running on that account.

@timmeade
Copy link

This has hit me today. Some of our other developers were complaining about it, but no issues here until this morning. I am running Yosemite 10.10.3 latest beta, and sublime updated THIS morning to Dev Channel build 3076 and the CPU issue started. I am running the emmit plugin, but only 1 user account. One of the other dev s had the issue on mavericks and went back to sublime 2 to make it go away.

MBP Fan running way too much.

@FichteFoll
Copy link
Collaborator

I think you are referring to 3076, and yes, that build seems to have issues which is why its download was removed from the page and is not updated to anymore.

@timmeade
Copy link

Thanks @FichteFoll you were correct. I received the update notification and just hit "of course". I'll revert.

@surajravi
Copy link

I am running ST3 build 3083 which cam e out just today and in its changelog there was mention of the high cpu usage fix and so i went for it.

However, my CPU usage still shoots up on a regular basis (with some intervals of low cpu usage in the middle)

I ran opensnoop on my mac and it shows ST3 opening a lot of files from my project. Initially I thought it was just indexing for the first time and I let it run but now after 6 hours it continues to do the same!

Please let me know if I can provide any more information that could help in solving/ getting to the root cause of this issue.

@ianneub
Copy link

ianneub commented May 15, 2015

I am also having this issue on build 3083. Fresh install of OS X and Sublime :(

@runeimp
Copy link

runeimp commented Jun 17, 2015

For me just having ST3 Build 3083 open for more than a few minutes sees CPU usage climbing well over 100% on my MacBook Pro with Yosemite 10.10.3. It seems to be worse the more folders (and there depth and file count?) in the sidebar. I never noticed the CPU usage problem on prior versions of OS X (10.9.x and lower).

@Radagaisus
Copy link

A machine restart seems to solve the issue temporarily, though it does reappear randomly after some time.

@stryju
Copy link

stryju commented Jul 4, 2015

A machine restart seems to solve the issue temporarily

that's not a solution

@pilot
Copy link

pilot commented Jul 16, 2015

same here, extremelly consuming cpu

@IstoraMandiri
Copy link

Same here. Any way to tell if this is due to a plugin? I'm not in a clean install, but seems to happen for certain projects more than others, rendering specific project unusable. It takes like two seconds to move the cursor due to my CPU being maxed out. ST2 has no issues.

Imgur

I tried the Index.save trick but to no avail. OSX 10.9

@ilazaridis
Copy link

Same issue here.
st3 build 3083, OS: Ubuntu 14.04

@bskimball
Copy link

Same here. Windows 7 build 3083. There are 2 sublime text processes running each at 25% cpu.

@IstoraMandiri
Copy link

Pinging this thread again. Infuriating problem that is seeming totally random. Midway through work and ST decides it's going to take 3 second to type each character for some reason.

😩

@runeimp
Copy link

runeimp commented Nov 12, 2015

Not seeing it here but in email following this issue Igor A. posted a link to https://www.sublimetext.com/blog/articles/file-indexing which helped me see the problem. Was definitely the indexing. When I opened my console there was a never ending list of number of files to index exceeds sanity limit, bailing out lines. Added "index_files": false, to my User Preferences and now CPU is dropped from 140% down to 0.1% in the Activity Monitor on my MacBook Pro. MUCH better.

@igoradamenko
Copy link

@runeimp Lol. I thought that I was wrong about it because source of my problem is killing of python.exe (started by plugin_host.exe — sublime's proc.). But it's glad to hear that it works!

@yongwangd
Copy link

runeimp's comment fixed my issue on windows 7 build 3083. Add "index_files": false to user preference settings. The CPU usage dropped from 80% to 4%

@collinksmith
Copy link

I had the same problem and adding "index_files": false solved it for me. I think it's a problem if the folder you're working in is too large or has too many files in it. In one project, I can solve the problem by excluding my node_modules directory from indexing by adding it to the "binary_file_patterns" list. This way I can still use goto_definition (which requires index_files to be set to true.

@qfox
Copy link

qfox commented Mar 17, 2016

same here. ;-(

@igoradamenko
Copy link

@zxqfox Does solution from this post not work for you?

@qfox
Copy link

qfox commented Mar 18, 2016

@igoradamenko I'm not sure, but looks like it was indexing. Thanks for pointing me!

@dauble
Copy link

dauble commented Mar 25, 2016

I was having the same troubles and wanted to note that adding "index_files": false fixed my problem, too. OS X El Capitan.

Thanks @runeimp and everyone else!

@crapthings
Copy link

http://hampuspersson.se/2014/06/fix-high-cpu-usage-by-sublime-text/

@kyhwsk
Copy link

kyhwsk commented Jun 1, 2016

experienced same problem TAT, OSX Yosemite 10.10.2

@a-x-
Copy link

a-x- commented Aug 4, 2016

ST3 starts load 100% CPU since today (it's long regular process)
Restart and remove most of the packages are not fix the trouble.

I see strange slow incrementing percent indicator in status bar:
2016-08-04_17-41-22

I update ST3 recently
I did not install new packages in current month
I removed all latest packages.
My packages list for the moment:

`ls '/Users/invntrm/Library/Application Support/Sublime Text 3/Packages' | sed 's/\s+/\t/g; s/^/* /g'` - Colorsublime-Themes - HTML-CSS-JS Prettify - Pretty JSON - PyV8 - Settings - SublimeCodeIntel - TodoReview - User - backrefs - bz2 - jshintify - pygments - pyyaml

@a-x-
Copy link

a-x- commented Aug 4, 2016

build 3114
2016-08-04_17-50-02

OS X 10.11.6 (15G31)

@igoradamenko
Copy link

@a-x- Does solution from this post not work for you?

@a-x-
Copy link

a-x- commented Aug 4, 2016

👍 Solution: #537 (comment)

    "folder_exclude_patterns": [
        "node_modules",
        "vendor",
        "pages-desktop"
    ]

@igoradamenko, it seems yes
I have shown my heaviest directories and ignored it: node_modules, vendor

du . | sort -nr | head -n20

@a-x-
Copy link

a-x- commented Aug 4, 2016

hey, friend, @zxqfox ))
amazing, you have same problem!

@bvn13
Copy link

bvn13 commented Aug 15, 2016

SublimeText 3, 3114.
Windows 7
CPU average 60%

"index_files": false helps me a lot.

@FichteFoll
Copy link
Collaborator

Since this appears to have become a huge pile of various issues, mostly related to indexing, I'm closing and locking it.

If you are having high CPU usage, it is most likely due to ST indexing your (probably huge) project. Check https://www.sublimetext.com/blog/articles/file-indexing for details and potentially add the "node_modules" folder to the folder exclude patterns, as mentioned a few comments above.

@sublimehq sublimehq locked and limited conversation to collaborators Sep 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests