Closed mbarkhau closed 6 months ago
Wouldnt't make sense to have it O(n²). Perhaps it was an issue with syntax highlighting the file?
Yeah maybe. I'll test later today.
So I set the syntax for the file to "Plain Text" and tried again. For an input of 12k lines it took 11 seconds to finish and for an input twice that size, it took 45 seconds.
I can't reproduce this in build 4168, ST indents and deindents 100k lines in ~3 seconds and performance is ~linear.
Could it be that the undent code is an O(n²) algorithm? I tried to undent 10000 lines of formatted json and sublime text froze. I waited a minute before killing it. In vim the same file is undented in under a second.