Sublime Forum

ignored_packages and loading speed

#1

Loading of Sublime Text 3 is deadly slow, when I’m added some syntaxes in ignore list:

"ignored_packages":
[
	"4GL",
	"ActionScript",
	"AppleScript",
	"ASP",
	"Batch File",
	"C",
	"C#",
	"C++",
	"Clojure",
	"D",
	"Diff",
	"Erlang",
	"Go",
	"Graphviz",
	"Groovy",
	"Haskell",
	"Java",
	"LaTeX",
	"Lisp",
	"Lua",
	"Makefile",
	"Matlab",
	"Objective-C",
	"OCaml",
	"Pascal",
	"R",
	"Rust",
	"Scala",
	"TCL",
	"Textile"
],
0 Likes

#2

Post the log from View -> Show Console which shows things like the time taken until the first paint, and Tools -> Developer -> Profile Plugins

0 Likes

#3

Profile Plugins

This list shows how much time each plugin has taken to respond to each event:

on_activated:
Default.pane: 0.000s total, mean: 0.000s, max: 0.000s
SideBarEnhancements.SideBar: 0.000s total, mean: 0.000s, max: 0.000s
SFTP.sftp.listeners: 0.001s total, mean: 0.000s, max: 0.001s
MaxPane.max_pane: 0.000s total, mean: 0.000s, max: 0.000s
BracketHighlighter.bh_core: 0.009s total, mean: 0.005s, max: 0.009s
SublimeCodeIntel.SublimeCodeIntel: 0.383s total, mean: 0.192s, max: 0.382s

on_deactivated:
Default.history_list: 0.002s total

on_load:
Default.detect_indentation: 0.048s total, mean: 0.005s, max: 0.008s
BracketHighlighter.bh_core: 0.000s total, mean: 0.000s, max: 0.000s
SFTP.sftp.listeners: 0.001s total, mean: 0.000s, max: 0.000s


console log (with ignored_packages)
console log (without ignored_packages)

0 Likes

#4

Syntaxes interact with each other by being included for the sake of nesting (think HTML, JS, etc). Because of this, when a syntax is removed from from the available list, it graph of available languages and includes needs to be regenerated.

The syntaxes are “compiled” and stored in optimized form on disk to speed up startup time.

In your attempts to improve the performance of the editor, it appears you are causing the syntax engine to recalculate the graph of syntaxes, and recompile them.

I’ll add this to my list of things to look into - seeing at what exact point during startup the ignored packages setting is processed.

In the nearer term, I recommend leaving those syntaxes enabled. There shouldn’t really be any significant performance impact from it.

2 Likes

#5

[quote=“wbond, post:4, topic:20672”]
In the nearer term, I recommend leaving those syntaxes enabled. There shouldn’t really be any significant performance impact from it.[/quote]
Sure, there shouldn’t be any Sublime Text app performance impact, but big lists can have a performance impact on the user searching through them. That’s why I trimmed my enabled syntaxes list at some point. But then again, I haven’t noticed any performance impact on ST3 so this is not an issue for me.

0 Likes

#6

I looked into this some, and was unable to replicate any issues with this.

However, looking more into your startup log, it seems to have a few “broken” files in your Packages/ folder.

ignored_packages: ["Vintage"]
unexpected rule type, was expecting one of match, include, begin or patterns, got: {comment: Note how all @rules are prefixed.}
generating syntax summary
generating meta info summary
Unable to parse binding {cmomand: wrap_zen_as_you_type, keys: [ctrl+shift+a]}
top level value must be an array
ignored packages updated to: ["4GL", "ActionScript", "AppleScript", "ASP", "Batch File", "C", "C#", "C++", "Clojure", "D", "Diff", "Erlang", "Go", "Graphviz", "Groovy", "Haskell", "Java", "LaTeX", "Lisp", "Lua", "Makefile", "Matlab", "Objective-C", "OCaml", "Pascal", "R", "Rust", "Scala", "TCL", "Textile", "Vintage"]

You’ve got at least one broken .tmLanguage file: (unexpected rule type, was expecting one of match, include, begin or patterns, got: {comment: Note how all @rules are prefixed.}).

You’ve also got a broken key bindings file (Unable to parse binding {cmomand: wrap_zen_as_you_type, keys: [ctrl+shift+a]}).

The issue with the broken syntax may be causing issues with Sublime Text caching the compiled forms of the syntax definitions.

Generally you should not see ignored_packages: and ignored packages updated to: before pre session restore time:.

1 Like

#7

After reinstalling app, i’ve found that cache folder in Library/Application Support/Sublime Text 3/Cache symlinked to nowhere. Thank you all for help)

0 Likes