sublime-better-coffeescript icon indicating copy to clipboard operation
sublime-better-coffeescript copied to clipboard

Causes Sublime to use 100% CPU on save

Open joual opened this issue 11 years ago • 4 comments

Working on a relatively large project mostly made of .py/.js/.coffee files and every time I save a file (even just a python file, without any js file open) it causes a CPU spike for several seconds from sublime 3, which consumes 100% CPU. I narrowed it down to this package by installing only this one and seeing the same pattern. I changed the package's user settings to pretty much all false to try and stop the indexing but nothing changed.

Edit: For what it's worth, reverting CoffeeScript.tmLanguage and CoffeeScript_Literate.tmLanguage to what they were a couple days ago fixes the issue.

joual avatar Oct 21 '14 14:10 joual

That edit just broke my heart :disappointed:

Thanks for the detailed report, I'll take a look asap!

markalfred avatar Oct 21 '14 14:10 markalfred

So, for a piece of regex which causes catastrophic backtracking for the commit 26dbc4ec0928b002d707eaf8705228b59d06b7be .

(for the regex /(?![\s=/*+{}?])(\\.|.)*?/[igmy]{0,4}(?![a-zA-Z0-9]))

"<li><a>" + status + "</a></li>" + "<li><a id=\"start-offline\" href=\"#offline_mode\" data-role=\"button\" data-icon=\"arrow-r\" data-iconpos=\"bottom\">Test</a></li>" + "<li><a href=\"#sync_survey\" data-role=\"button\" data-icon=\"refresh\" data-iconpos=\"bottom\">Test</a></li>" + "<li class=\"nfc\"><a href=\"#survey-options\"  data-role=\"button\" data-icon=\"gear\" data-iconpos=\"bottom\">Options</a></li>" + "</ul>"

Here's a link to see that it causes the issue : http://regex101.com/r/pQ5lB6/1

joual avatar Nov 07 '14 17:11 joual

Any word on this? Can that commit be reverted until a better fix is found?

sciyoshi avatar Dec 16 '14 17:12 sciyoshi

any updates? CoffeeScript highlighting causes Sublime Text 3 to crash sometimes on big files

vmkcom avatar Nov 19 '15 14:11 vmkcom