Sublime Forum

ST3 and ST4 search and replace very slow

#1

I have SQL database (3.1MB) and ST3 opens it very fast, ST4 even faster.
However when I do:
Search: ,
Replace: \n
it takes 11:43 minutes on ST4 and 9:59 on ST3.
There is no big difference in time if it is regex (newline \n) or simple character change (, -> a)
Structure of SQL database file is:
Total lines: 346
Longest line: 1,038,931 characters
267679 matches of ,

Tried with plain text (without syntax coloring) - same or almost same.

Same operation:
Search: ,
Replace: \n
via linux tr command (tr , ‘\n’ <X.sql >Y.sql) finishes a job in 0.008 seconds (74500 x faster).

Configuration:
CPU: 16c/32t, RAM 32GB, OpenSUSE 15.2 and OpenSUSE 15.4
Sublime text: 3.2.2 Build 3211 and latest ST4

0 Likes

#2

Sublimes S/R isn’t optimal for large operations sadly. It’s been discussed previously and I also run into this same issue when doing operations on plaintext.

As it stand, there is likely room for improvement but I’m not sure the priority of it

0 Likes