Sublime Forum

Infinite loop reparsing JSON

#1
  1. paste all this text in a new window - https://pastebin.com/E7SYQtn1
  2. set syntax to json
  3. select " then hit select-all (alt-f3)
  4. press delete, then press " to replace " with "
    => Sublime 3 build 3203 is stuck.
0 Likes

#2

This sort of thing is pretty common with massive simultaneous edits. If you wait long enough, it’ll come to its senses. It’s not actually infinite, just really really long.

0 Likes

#3

Right, I kinda expected that would be the case, but I have an i9 CPU and after a minute it was still stuck :slight_smile:

And it’s caused by the syntax highlighting, not the simultaneous edits. I did the same in plain text mode and it was instant.

0 Likes

#4

Is this happening with no plugins installed? https://www.sublimetext.com/docs/3/revert.html

Generally I wouldn’t expect switching from JSON to plain text should cause such a performance difference.

0 Likes

#5

You’re right, with plugins disabled there’s only a 2-3 second hang.
Thanks for pointing it out. Let me know if I should try to trace the guilty plugin.

0 Likes

#6

The guilty subject in such matters is almost always Bracket Highlighter, if you have it installed.

0 Likes

#7

I do. :slight_smile: Thanks a lot!

0 Likes