Sublime Forum

Sublime runs very slow after reading large file



Having trouble with working on a 23MB file.It is a text (.sql) file. It loads within a couple of seconds. The problem lies within sublime itself, highlighting text, adding text, scrolling and basically any operation is too slow making sublime unresponsive.

Any idea what’s going on? this is on Sublime 3.2.1 build 3207



I don’t know for sure, but you could try setting index_workers to 2 in the User Settings.



What operating system are you using? Also, does your large file have a lot of really long lines in it? Does changing the syntax to Plain Text after you open the file make it any faster?



Windows 10 Pro. Yes, it does have really long lines. Changing it to plain text does not help, still the same laggyness.
I just enabled “word wrap” and it’s not slow anymore!
Why would word wrap fix it? I mean lines still have the same delimiter… is it a UI thing?



Sublime has some known issues with really long lines of text in files, but the only things I can find that reference it are things like the post linked below which refer to things like potential syntax definition woes (in which case it would work better as Plain Text). It can also be an issue in cases where you use Find in Files in something like a big JavaScript project, where the search hits on what is essentially an entire file minimized down to a single line

I would actually expect that having word wrap turned off would be better for performance than having it turned on, since in that case it could “clip” the remainder of the text off the side of the window. Perhaps the internal representation of the data is slightly changed when it’s turned on and that makes it faster.

1 Like


Interestingly enough, text was only being clipped on the Y axis, so very long lines would result in slow render times. We’ve got a fix for this in the pipeline.