Sublime Forum

Sublime consumes cpu on Mac after update

#61

@wbond Thanks, you were correct about ~/.git existing and ST3 trying to track my entire home dir. Sorry for not reading carefully and realizing that the Console was not the same as the system Console. The problem is now resolved.

0 Likes

#62

please make it stop… the indexing runs out of control

it seems like it’s done and then a while later I find my cpu is maxed out again and it’s indexing something again

can we turn off the feature that triggers indexing?

0 Likes

#63

For anyone with high CPU please try dev build 3202.

0 Likes

#64

installed build 3202

it has started indexing again, currently 7%

will see if it completes successfully and does not restart

0 Likes

#65

Indexing is to be expected, unless you disable the indexing (and consequently the Goto Definition functionality). This thread is about users with constant 100% CPU when not indexing.

0 Likes

#67

Also having severe CPU issues. Tried disabling indexing, disabling the git feature, etc.
Perhaps this could point the direction, though. Opening any text file and pressing Ctrl+S to save without making any changes shows this in the indexer status panel:
indexing [job 262]: spawning 1 workers to process 1 / 1 files
indexing [job 262]: indexed 1 files
index “frvr-tools…” collated in 0.93s from 9064 files
index “frvr-tools…” is using 18057593 bytes for 18119 symbols across 181217 locations

That’s 1sec of CPU time on a beefy 6 core machine to do nothing, since the file hasn’t changed at all.

Please note that the file isn’t even from the “frvr-tools” folder implicated here.

0 Likes

#68

The name of the index is based on the list of open folders you have, so my hunch would be that is just the first folder you have open in your side bar.

When we get a filesystem notification that a file has changed, we rescan it. It could be that Sublime Text changed it, or maybe you have a filesystem watcher that invokes a build process that wrote the file. We can’t really know, so when we see a file change, we check for changes.

Spending 1 second clock time shouldn’t really be “severe CPU issues”. Do you have constant CPU usage, or does it go away after indexing has completed? Have you tried build 3202? Can you post the contents of your console?

0 Likes

#69

Well, I think that 1 second then causes dropbox git and other background processes to pile up, etc, and Sublimetext.exe ends at 35% CPU usage and the UI becomes unresponsive for several seconds. That’s pretty disruptive if it happens every couple of seconds.

It didn’t happen until I updated to 3200. I’ll try 3202, but haven’t found where I can get it from yet.

Please note I use the same install via Dropbox on several machines.

Here’s the console after startup:

DPI mode: per-monitor v2
startup, version: 3200 windows x64 channel: stable
executable: /C/dropbox/PortableApps/SublimeText/sublime_text.exe
working dir: /C/Dropbox/PortableApps/SublimeText
packages path: /C/dropbox/PortableApps/SublimeText/Data/Packages
state path: /C/dropbox/PortableApps/SublimeText/Data/Local
zip path: /C/dropbox/PortableApps/SublimeText/Packages
zip path: /C/dropbox/PortableApps/SublimeText/Data/Installed Packages
ignored_packages: ["LESS (DESKTOP-FODBA1F's conflicted copy 2018-12-06)", "Markdown", "SublimeLinter-contrib-eslint", "Vintage"]
generating syntax summary
generating meta info summary
pre session restore time: 3.39506
startup time: 3.49506
first paint time: 3.49706
Unable to open /C/gitroot/game-words/game/js/mpasync/mpasync.js
Unable to open /C/gitroot/game-words/game/js/game.js
Unable to open /C/gitroot/game-words/game/js/mpasync/tiny_promise.js
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
indexing [job 1]: spawning 2 workers to process 3289 / 3289 files
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
Package Control: No updated packages
0 Likes

#70

Hmm, this seems odd. Indexing happens in a background process, so it really shouldn’t be able to lag the UI, especially since the background processes are low priority and you have 6 cores.

I see it is taking almost 4 seconds to open Sublime Text. That sounds abnormally high. Are you using an SSD, or a traditional hard drive?

EDIT: Forgot to ask, have you tried disabling all packages? The symptoms sound like a package blocking the UI.

0 Likes

#71

Just to clarify, this log was on my desktop. I mostly encounter the issues on the laptop which has an EVO 970 M.2 SSD (~3.5gigabytes/sec). Also, the CPU isn’t used by the indexing processes, but but the root process while no indexing processes are visible.

I Installed 3202, and will test it on the laptop tomorrow.

PS: none of what you said explains why performance only changed when I updated to the latest build, using the same plugins and the same hardware.

0 Likes

#72

Right, what I explained has everything to do with indexing, however you’ve indicated now this has nothing to do with indexing. My hunch is a large git repo with lots of filesystem activity (constant churn in dirs that are not ignored), a folder named .git that is not a repo, or an accidentally created git repo in your home dir. So far one of those has been the explanation for every occurrence of high CPU that I’ve seen. The cause of the high CPU usage is that the git repository client watches for filesystem activity, and when files change, it gets the full status info for the repo, so that the status badges in the sidebar may be drawn. If you have constant filesystem activity that is not ignored, the git client is constantly looking to see what files changed status, and if the repo is large, traversing the tree and checking the status takes some time.

I seems very odd that the machine you describe should take 3.5 seconds to load Sublime Text. My 2013 Mac laptop with a 400MB/s SSD takes 0.63s of startup time. How many different Sublime Text windows open when you start Sublime Text? If you could post a log from your laptop, that would definitely be more helpful than from a machine not experiencing the issue.

0 Likes

#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