A quick ‘hi’ as I’ve been off the map for a little while. Returning to the topic at hand (and I’ve commented on this a few times before over the years) Sublime’s performance with either very large files (1Gb+) or files with very long lines (10k+ chars) leaves a lot to be desired. Generally I avoid using Sublime for such tasks and have to fall back to Crisp or Vim which handles pretty much anything with lightning performance.
@gwenzek respectfully disagree on the idea that editors always struggle with huge files. Those whose engines have been coded to handle them well do so with ease and there are numerous examples. Crisp, for example, demand-loads such files so editing an 8Gb file is no problem on a machine with 2G RAM.
Returning to Sublime, setting syntax to “Plain text” often helps, since this effectively disables the heavy duty regexes required for scoping/colouring source, along with disabling wrap & highlight matches on S&R.
Sublime could do with some improvements in its editing engine, along with some adaptive intelligence with respect to handling large files and anything else which might be performance blocking. The reason? I’ve maintained before that Sublime is a tough sell if it can’t be a “swiss army knife” editor for programmers and hackers. One of the jobs we all need to do from time to time is work with huge files (usually log files in my case) and it’s a shame that I can’t be in Sublime’s environment (with its plentiful sugar) when doing so.
By “adaptive intelligence” I mean things like offering an abort when Sublime is doing anything that blocks the UI for a while - whether that be opening huge files or using plugins that end up doing more work than intended - changing editing engine setup when working with huge files, disabling wrap as mentioned above, disabling ‘highlight matches’ for S&R, disabling colourisers etc. Since such parameters vary to some extent with hardware, it’d be nice to have thresholds configurable. Such improvements would make Sublime much more robust when working with large files, avoiding the ‘doh’ moments when you do an S&R on a big file and the whole UI locks up while it tries to highlight every match in the file.
Bottom line: Sublime isn’t great with big files. If you’re going to, turn off wrap, set plaintext and turn off highlight matches on S&R dialogs. I’d love to see some work in this area and though I know it’s a chunk of work it would secure Sublime as the clear choice for programmers and hackers expecting high performance, powerful editing across all text file types and sizes.