Sublime Forum

[BUG] Search and replace is very slow on big files

#1

Searching and replacing small amount of text in >200KB (No spaces, new lines or tabs) files makes Sublime Text (Build 2139) to hang up. I assume that it’s just very slow, but never tried waiting for a bit longer till it completes.

0 Likes

#2

I can confirm this.

Further, search (without replace) is also very slow on large files and can cause app hangs (I’ve seen it mostly in the Windows version). Even simple editing in very large text files (>10MB) can be a very tedious process.

Before anyone asks, a use case for such a large file is delimited export from a foreign database that needs analysis/deduping/etc before importing into the local system. I typically crack these open in a text editor first so I can easily define parsing rules in my analysis scripts. Version 1 seemed very responsive on these large files, but 2 is nearly unusable for this.

0 Likes

#3

king: do you have any plugins installed?

0 Likes

#4

Hi there,

I’d just like to add that I’ve found this to be the case, too, in my current version of SublimeText 2 (latest build, OS X 10.7.2). Like the previous poster, I sometimes have to do a search & replace on a large SQL dump for migration purposes. My current dump is only 7 MB, but as we speak SublimeText is still processing away after clicking “Replace all”, turning my MacBook Pro’s fan on high as a result. It feels as if it’s been 10 or 15 minutes and I’m about to kill the process.

MacVIM, on the other hand, executes the same search & replace on the 7 MB file in under a second.

I have no plugins installed on SublimeText 2. Maybe I’ll try a fresh install just to be sure.

By the way, I have successfully done search & replaces on large files such as this using SublimeText 2 maybe a month or two ago (the last time I had to do this kind of task) - but that’s quite a few builds ago now.

Cheers,
Paul

0 Likes

#5

I’ve also tried setting the file type to “plain text” before doing the search & replace, to see if syntax parsing had something to do with the freeze - but it didn’t have any effect. Still essentially froze SublimeText (never had the patience to wait more than 20-25 minutes to see if it might recover).

0 Likes