Sublime Forum

Sublime consumes cpu on Mac after update

#73

I’ve started up on my laptop, after waiting for everything to settle down, low CPU usage and no other windows visible. I’ll paste the start-up log below.

On the other hand, I’ve seen some laggyness when testing my game. I think refreshing the browser causes a build artifact, which causes an index operation, and since the build is still on-going, both processes get slowed down. I’m sure Dropbox, github and the windows file scanner all want their piece of the pie at the same time, when I really need my CPU to finish the build ASAP.

Unfortunately, the index log doesn’t reveal which file is being scanned, so I don’t know what to exclude. sublime.log_indexing(True) has no effect on the output of the indexer in the console.

I’m also adding a screenshot of ProcessExplorer during one of the freeze episodes. It jumps to 10-35% CPU usage and becomes unresponsive for several seconds. Sometimes, clicking on it causes the window to “white out”, which seems to be a windows 10 thing fro unresponsive processes.

Thanks for your help!

DPI mode: per-monitor v2
startup, version: 3202 windows x64 channel: dev
executable: /C/Users/Sven/Dropbox (Personal)/PortableApps/SublimeText/sublime_text.exe
working dir: /C/Users/Sven/Dropbox (Personal)/PortableApps/SublimeText
packages path: /C/Users/Sven/Dropbox (Personal)/PortableApps/SublimeText/Data/Packages
state path: /C/Users/Sven/Dropbox (Personal)/PortableApps/SublimeText/Data/Local
zip path: /C/Users/Sven/Dropbox (Personal)/PortableApps/SublimeText/Packages
zip path: /C/Users/Sven/Dropbox (Personal)/PortableApps/SublimeText/Data/Installed Packages
ignored_packages: [“LESS (DESKTOP-FODBA1F’s conflicted copy 2018-12-06)”, “Markdown”, “SublimeLinter-contrib-eslint”, “Vintage”]
pre session restore time: 0.355598
startup time: 0.451598
first paint time: 0.455598
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.detect_indentation
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.01-pygments
reloading plugin 0_package_control_loader.02-bz2
reloading plugin 0_package_control_loader.50-markupsafe
reloading plugin 0_package_control_loader.50-pymdownx
reloading plugin 0_package_control_loader.50-python-markdown
reloading plugin 0_package_control_loader.50-pyyaml
reloading plugin 0_package_control_loader.51-python-jinja2
reloading plugin 0_package_control_loader.55-jsonschema
reloading plugin 0_package_control_loader.55-mdpopups
reloading plugin ApplySyntax.ApplySyntax
reloading plugin ApplySyntax.support
reloading plugin Colorsublime.colorsublime-plugin
reloading plugin Diffy.diffy
reloading plugin Duplicate Lines.duplicate_lines
reloading plugin FindKeyConflicts.find_key_conflicts
reloading plugin Hide Menu.sublime-hide-menu
reloading plugin Javascript Beautify.jsbeautify
reloading plugin MarkdownEditing.bootstrap
reloading plugin MarkdownEditing.custom_find_under_expand
reloading plugin MarkdownEditing.decide_title
reloading plugin MarkdownEditing.distraction_free_mode
reloading plugin MarkdownEditing.folding
reloading plugin MarkdownEditing.footnotes
reloading plugin MarkdownEditing.indent_list_item
reloading plugin MarkdownEditing.indent_list_multiitem
reloading plugin MarkdownEditing.lint
reloading plugin MarkdownEditing.list_back_links
reloading plugin MarkdownEditing.make_page_reference
reloading plugin MarkdownEditing.mdeutils
reloading plugin MarkdownEditing.numbered_list
reloading plugin MarkdownEditing.open_home_page
reloading plugin MarkdownEditing.open_journal
reloading plugin MarkdownEditing.open_page
reloading plugin MarkdownEditing.prepare_from_template
reloading plugin MarkdownEditing.quote_indenting
reloading plugin MarkdownEditing.references
reloading plugin MarkdownEditing.replace_selected_command
reloading plugin MarkdownEditing.switch_list_bullet_type
reloading plugin MarkdownEditing.underlined_headers
reloading plugin MarkdownEditing.wiki_page
reloading plugin MarkdownPreview.markdown_preview
reloading plugin MarkdownPreview.markdown_settings
reloading plugin MarkdownPreview.markdown_wrapper
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
reloading plugin Pretty JSON.PrettyJson
reloading plugin Sass.sass_completions
reloading plugin SCSS.scss_completions
reloading plugin ShaderLanguages.ParseCG
reloading plugin SqlBeautifier.sqlbeautifier
reloading plugin SublimeLinter-eslint.linter
reloading plugin SublimeLinter.init
reloading plugin SublimeLinter.active_linters_view
reloading plugin SublimeLinter.busy_indicator_view
reloading plugin SublimeLinter.goto_commands
reloading plugin SublimeLinter.highlight_view
reloading plugin SublimeLinter.log_handler
reloading plugin SublimeLinter.message_view
reloading plugin SublimeLinter.panel_view
reloading plugin SublimeLinter.status_bar_view
reloading plugin SublimeLinter.sublime_linter
reloading plugin Sublimerge 3.Sublimerge
reloading plugin BufferScroll.BufferScroll
reloading plugin ESLint.ESLint
reloading plugin HTML-CSS-JS Prettify.HTMLPrettify
reloading plugin LineEndings-st3.LineEndings
reloading plugin Pretty JSON.PrettyJsonListeners
plugins loaded
reloading settings Packages/User/ApplySyntax.ext-list
reloading settings Packages/User/Bash.sublime-settings

0 Likes

#74

Sublime Text is also consuming large gobs of CPU for me as well. Just having Sublime Text in the background makes my computer get hot and my fans spin. I have macOS Mojave 10.14.4 on a MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports). I have “Version 3.2, build 3200”. My indexing status is idle.

I have a git repository in my user folder. I use it to keep track of changes to my bash profile files, and nothing else. I know that this is probably not the best way to track these, but it hasn’t caused me any problems up until now.

0 Likes

#75

You’ll want to disable git status in that case.

0 Likes

#76

I’ve had the same problem with CPU after update on v3.2 Build 3200. I set <“show_git_status”: false> in settings and fixed it.

0 Likes

#77

SublimeText 3 (Build 3207) is killing my CPU on OSX 10.14.4 as well. There is no ~/.git folder, however.

07%20AM

0 Likes

#78

Since you are on 10.14.4, try setting gpu_window_buffer to false in your Preferences.

1 Like

Sorry, but 3.2 is the worst version ever (unless git integration is disabled)
#79

Will give that a go, thanks @wbond!

0 Likes

#80

Had the same indexing issue. CPU struggling to index 200k+ files. Ignoring any dependency libs (node in my case) fixed it immediately.

"index_exclude_patterns": ["node_modules/"]

As far as I can tell, dfn/symbol lookups still work fine for my project files. If I’ve made a mistake by excluding node_modules, I’m open to other suggestions!

1 Like

#81

This worked for me. Thank you!

Indexing was stuck, and made my computer completely unusable. I really think this needs to be fixed.

0 Likes

#82

On my Mac (Mojave 10.14.6), I had disabled the indexing and git status line, but still got an enormous number of scan: ... lines and CPU usage, even when none of the open files referenced a git repo.

I eventually shutdown ST3 (build 3207 BTW), ran rm "${HOME}/Library/Application Support/Sublime Text 3/Local/*.sublime_session".

On restarting the problem has gone away. I suspect that ST3 crashed at some point and left behind references to the .git repos that caused the problem.

0 Likes

#83

I’ve been using Sublime for years and love it, but lately performance issues are making my MacBook completely unusable.

I’ve read through this topic and tried various suggestions…

I’ve tried setting show_git_status and gpu_window_buffer to false.
I’ve deleted the session.

I’m on 3.2.1 / 3207, on macOS 10.14.6 (18G84).

Every time I save any file, it rebuilds the entire project index from scratch - is that how it’s supposed to work?

I can wait for the indexing to finish (several minutes), but as soon as I save a file, it starts again. If I don’t wait for it to finish, it starts again. It’s always indexing! Given how much CPU that consumes, I can’t get anything else done.

At the moment, I have no alternative except to disable indexing, which is a shame as “goto” is really handy.

Any ideas?

0 Likes

#84

Latest Sublime. MacOS catalina, iMac 2018 16gb ram. 1tb ssd.
Sublime consumes over 100% memory.

1 Like

#85

Could you check the sublime indexing status: Help>Indexing Status…, as well as try reverting to a freshly installed state.

0 Likes

#86

Just installed Sublime 3.2.2 for the first time ever. I’ve never used it before, but I like what I see, at least for the first minute or so. Now it’s spiking my CPU and is almost unusable. Tried https://www.sublimetext.com/docs/3/revert.html but no luck. Also, checked indexing status and its “idle”. I’m on macOS 10.15.4. :frowning:

0 Likes

#87

Could you post your console output?

0 Likes

#88

Trying to figure out what you’re referencing. I see that question being asked a lot in this thread, but as I am new to Sublime, I haven’t yet found the document on how to produce what you’re asking for.

0 Likes

#89

The Sublime console is a panel that you can open at the bottom of the window that shows status messages from Sublime, your plugins, etc. You can get at it by using View > Show Console from the menu or using the key binding that’s displayed there (or via the panel chooser menu in the bottom left of the window).

0 Likes

#90

Ah, of course. MacOS now lists Sublime as “using significant energy”, but at least the fan hasn’t started running this time. It was non-stop last time. Not sure what’s different this time. I’ll keep using it and if it happens again I’ll capture the console right away. For now, hopefully something below helps…

Thanks!

using gpu buffer for window
environment variables loaded using: /bin/bash -l
scan: /Users/sean/Documents/Development/powrslide-qt/target/PowrSlide.app/Contents/MacOS/PyQt5/uic has been seen before, skipping (using inode) previous path: /Users/sean/Documents/Development/powrslide-qt/target/PowrSlide.app/Contents/Resources/PyQt5/uic inode: 8673107416
scan: /Users/sean/Documents/Development/powrslide-qt/target/PowrSlide.app/Contents/MacOS/PyQt5/Qt/translations has been seen before, skipping (using inode) previous path: /Users/sean/Documents/Development/powrslide-qt/target/PowrSlide.app/Contents/Resources/PyQt5/Qt/translations inode: 8673107424
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.detect_indentation
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading plugin 0_package_control_loader.00-package_control
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
plugins loaded
Package Control: Skipping automatic upgrade, last run at 2020-05-12 20:33:31, next run at 2020-05-12 21:33:31 or after

0 Likes

#91

I have not up upgraded, using sublime 3 for many months, no new extensions/addons installed but all of a sudden there is a spike rendering it useless.

0 Likes

#92

The indexing will parse all of the code in any folders you have open, which can take a while when you first open a folder, especially if the folder contains many thousands of files.

Future releases of Sublime Text will have some improvements to the performance of indexing, which should minimize this.

The other thing that can consume a lot of CPU is if you open a large folder with many filesystem events happening. For instance, if you open your user home folder, Sublime Text gets filesystem notifications about every file creation, modification and deletion. With a home folder, this can be quite a lot of activity.

If you are using Package Control a new version of a package may have been installed. The way to test would be to see if https://www.sublimetext.com/docs/3/revert.html helps.

1 Like