Sublime Forum

Updating to 3114 makes plugin_host.exe spike in JSON

#1

Haven’t been able to test this at home on my Win7x64 setup that shares a config with this OS X (El Capitan) version that is currently experiencing this issue. After updating to 3114, plugin_host.exe takes 40-90% of the CPU while editing JSON, causing character entry to be sporadic, slow, and prone to missing keys pressed.

  1. How do I (without uninstalling all my plugins), test booting the editor in a “safe mode” where it doesn’t load the plugins, do determine if this is a core cause?

  2. How can I specify to my editor that I do not want it to every auto-update a plugin or the Sublime Editor itself without my express consent? These issues happen every so often, and the editor in this state is unusable, so though I understand I run the risk of running un-patched software, I’d like to know how to prevent auto-updates to both to prevent this issue.

Thank you for your assistance.

0 Likes

#2
  1. Follow the directions from https://www.sublimetext.com/docs/3/revert.html, but save your data folder
  2. Check out https://packagecontrol.io/docs/settings
1 Like

#3

There is a setting ignored_packages that you can manipulate to stop packages from being loaded. The default setting is:

    // List any packages to ignore here. When removing entries from this list,
    // a restart may be required if the package contains plugins.
    "ignored_packages": ["Vintage"]

You can put all of your plugins in the list to stop them from loading initially. If that solves your problem, you can remove them from the list one at a time to re-enable them to see which one is causing the problem.

If you have a lot of plugins, it can be helpful to take a binary search type of approach; Add half of the packages at a time to quickly narrow down which might be causing the problem.

As far as I am aware, Sublime doesn’t automatically update itself and instead tells you that there is a new version available. You can get it to stop performing that check by changing the state of this config option:

// Note: this option is only honoured in licensed copies of ST3
"update_check": false

PackageControl itself has a configuration option to control whether or not it automatically updates packages:

	// If packages should be automatically upgraded when ST starts
	"auto_upgrade": true,

You can modify that via Preferences > Package Settings > Package Control > Settings - User. Under MacOS, the Preferences menu is located under the Sublime Text menu item instead of in the main menu bar.

1 Like

#4

@wbond
Thanks for the tips! That article stated to remove my ‘data’ folder that was located ‘in’ ~/Library/Application Support/Sublime Text 3, but there is no such folder by the name ‘data’ in that location. Do they mean the ‘Sublime Text 3’ folder IS the data folder?

@OdatNurd
I’m a but confused by the difference between a Package and a Plugin. So a Plugin is considered a Package? Where do I get it’s official name so that the “ignored_packages” key will relate it? Thank you, also for confirmation on the auto_upgrade for package control. I know I’m taking a risk not running the latest patched versions, but I feel crippled when my poor Sublime is dying because of some incompatible plugin causing this process to spike.

Oddly, it only slowed when I was modifying the key/values. I could write comments and it would never spike. It must be active parsing that was causing the issue in the errant plugin.

0 Likes

#5

Yes, the Sublime Text 3 folder is your data folder.

1 Like

#6

You should think of them as just different names for the same thing; a PlugIn being something that modifies the behaviour of sublime in some way (e.g. new snippets, a new syntax definition, custom code, etc) while a Package is just the way all of the files are grouped together to make distribution and maintenance easier.

Based on that, the list of Packages is just the list of directories in the Package directory, which you can get to via Preferences > Browse Packages (this is just packages outside of the ones that ship by default with Sublime, however).

That said, one of the “packages” is the User package where your settings are kept, and there may be a couple of other ones that are the dependencies used by PackageControl itself.

As such, assuming all packages you installed were installed by PackageControl, you should use Preferences > Package Settings > Package Control > Settings - User to look at the PackageControl configuration, which shows you which packages are currently installed and even provides them in a form that’s easy to add to the list of ignored packages.

1 Like

#7

@wbond
Thank you, sir! You have to admit, but the wording in that article, it DID say that my “data folder was -IN- the following location…” :slight_smile: I renamed the folder, booted, and Sublime operated without a single issue. So that must mean there is an incompatible plugin with this version! Thank you so much for the troubleshooting step!

@OdatNurd
Thanks for the clarification on Package and Plugin. With the in-depth information you have given me, I should not be able to systematically (binary chop) the plugins, disabling them and re-enabling them until I see the similar behavior.

I assume that the faulting plugin will have to be made compatible again via the author, but I can at the least disable it for the time-being and check on it to see when it’ll be fixed.

Thank you both for the troubleshooting steps! Great to have that kind of support.

1 Like

#8

Awesome! I was able to use your knowledge and determine the faulting plugin!

SublimeLinter-contrib-eslint :rage:

The moment it was commented out alone, all my performance returned. I definitely want to be able to ESLint in my JS code, but I will have to let the author know about this and hope they can find the cause.

You two are tops! Much appreciated.

UPDATE: Oh shoot. I messed up. It’s not SublimeLinter-contrib-eslint that’s messing me up, it’s actually SublimeCodeIntel!. Oops. (I hadn’t saved the file to exclude the right thing when I made the assumption. D’oh!

1 Like

#9

Historically, a plugin is a Python plugin that interfaces with ST’s API in a way. Plugins can be part of a package, which can contain more resource files such as syntax definitions or key bindings.

1 Like