What Jade syntax are you using? Can you provide an example of a .jade
file that causes ST to hang?
Have you tried installing a newer version of the JavaScript syntax, as discussed at [Solved] High CPU Usage in Beta 3124?
What Jade syntax are you using? Can you provide an example of a .jade
file that causes ST to hang?
Have you tried installing a newer version of the JavaScript syntax, as discussed at [Solved] High CPU Usage in Beta 3124?
Here is an example of a .jade
file
:doc
@name Toolbar
@props {Boolean} [left]
@props {Boolean} [center]
@props {Boolean} [right]
import './index.ess'
var classFn = this.composeClasses('Toolbar')
.Toolbar(className=classFn())
div(className=classFn('&-inner'))
if props.left
div(className=classFn('&-left'))
yield left
if props.center
div(className=classFn('&-center'))
yield center
if props.right
div(className=classFn('&-right'))
yield right
:module
export var mixins = [require('ui-kit/mixins/compose-classes')]
I havenāt tried updating my js syntax, iāll try that now. Is there a way to reset the state on ST? i canāt open it currently because of the feature of re-opening files where i left off, so it re-opens a file that it is hanging on, and all i can do is force quit.
(FYI, iām on OSX El Capitan)
You could wipe your Local/Session.sublime-session
file, but you probably donāt want to do that. Installing the JavaScript.sublime-syntax
override is likely to fix what you are running into.
Why wouldnāt i want to wipe the Local/Session.sublime-session
file? Iām not worried about losing any changes, if that is the concern there.
It just kills all of your history (recent projects, searches, and more). Any adjustments youāve made to the size of UI panels, or options, like the Find panel.
Well, i killed it, it was a choice between ST not working at all, re-installing, or just losing that, which i would have anyway for the other two options. Adding the Javascript.sublime-syntax
override did solve my problem. Has the underlying problem been diagnosed? I have about 30 colleagues who will all have this issue when they update. I warned them all this morning to not update because of this
The underlying issue is that the Jade syntax uses regex constructs that arenāt supported by our newer regex engine. It ends up including the JavaScript syntax that ships with Sublime Text. That syntax uses a regex that works fine on a non-backtracking engine (like our newer engine), but once combined with the regexes from Jade it causes catastrophic backtracking in the Oniguruma engine.
Unfortunately it seems that none of the users of the dev builds utilize the Jade syntax, nor the MarkdownEditing syntax with fenced js code blocks.
Iām a dev build user and I refuse to use any syntax that wonāt use the sregex engine, so thatās why I never discovered it
it shows how important it is to get an even more diverse group of people on the dev builds thoughā¦ consider using them, people!
Well thatās unfortunate. Iāll let my team know about the override. Anyway, thanks for all the help! Iāll check into using the dev builds, maybe i can at least cover the jade syntax issues.
lol and maybe some day iāll have the luxury of choosing my syntax, but today is not that day. And, honestly i love the dev perks of using jade, itās unfortunate that itās conflicting so bad with ST
I guess Iām special in that I manage to find the time to hack together my own syntax that is suitable enough for my needs I donāt tend to regularly work on many different file types though, which makes it easier
Hi WBond,
Thanks for the updateā¦but I guess Iām kind of wondering if there is a bigger fix possible? Iāve been reporting the miserable experiences that indexing and broken plugins create for a long time now. For anyone developing NodeJS (and probably other dependency-heavy platforms as well), huge directory trees are the norm - not an edge case.
Could Sublime:
This is probably the 4th or 5th time Iāve had a situation where some change (plugin, new Sublime build, etc) causes my whole editing experience to grind to a halt, and the solution always involves hackily editing config files, looking under the hood etc. Surely my experience is not rare.
Could everyone install dev build 3125 and see how it helps?
Weāve included the JavaScript change, but also made some tweaks to the default number of index_workers
. Jon created a new Help > Index Statusā¦ window to show all of the indexing activity.
Weāve got some more tweaks planned for the future, but hopefully these changes should help users experiencing acute behavior.
Fundamentally there really arenāt issues with large folder trees. I dogfood ST on a daily basis with projects of around 100k files and regularly work on the syntax definitions, where saving a syntax definition triggers reindexing.
We made a tweak in 3125 to the default number of workers that should address users who donāt care for fans spinning up on their laptops.
Sublime Text already sets indexers as low priority. While it is true that the indexers will use spare CPU, it shouldnāt really ātake overā unless the OS has trouble scheduling. Our tweak to the default number of indexers should help reduce this symptom.
The Console shows errors in indexing, to allow the user to find issues with syntaxes. The progress of indexing is displayed in the status bar, and there is a new Index Status window in build 3125 allowing users to see exactly what is going on.
Weāve got some ideas about further ways we can make the indexing process even more robust.
One of the best ways to help ensure that betas donāt run into situations like we are discussing here is to help test the dev builds and help test the third-party packages you use with the dev builds.
I switched to build 3125 and removed my Javascript.sublime-syntax
and the indexing seems to have worked properly (the output was error free). Thanks for the fix! iāll try and keep up with dev builds in the future.
I canāt even paste with out having it hang. Not sure how such a basic functionality could do that. Iāve exited and restarted about 6 times in the past 10 minutes. Also it is just 3 lines of code. Iām probably just going to switch to Atom this weekend
Is this build 3125 you are talking about? If so, what syntax are you using when you try to paste?
This is 3124. I am trying to paste a simple html snippet. In to a 95 line file
Oh, you should try dev build 3125 and confirm that it works.
The issue is that a third-party package you have installed (MarkdownEditing, Jade, or possibly some other) uses regexes that combined with regexes in the default JavaScript syntax cause catastrophic backtracking on the Oniguruma regex engine when combined with certain code.
We shipped a dev build with a fix for it last night and are planning to ship a new beta shortly.
I may when I am less mad at sublime. With the latest updates Iāve probably lost an hour or so. Not counting the times I lost work because I tried to paste like a fool. I mean the background updates of packages usually makes it hang for about 10 minutes with no indication of what is going on