Sublime Forum

Bug sublime freezes doing regexp replace on 400k file

#1

Firstly thanks for a great editor (I even bought it privately)
trying to extract some columns from a large file
(not that large… vslick does the replace within about 2 sec)
sample lines

abcd1234, 123.4567, 52.283284, 23, 10.23.45

my regexp ^^,], (^,]*, ^,]*).*
replace with \1
works fine for a sample file of a few hundred lines.
When I enter a file of 400k lines, it goes away for ever.

As a fellow programmer some suggestions for dealing with large files:

  1. on load show the first page or two to the user, and continue processing in the background for the minimap (or disable minimap for files > a threshold)
  2. The instant highlighting while typing a rexexp is great for normal code, but again on a large file, becomes painfully slow, as after each character you type in the regexp, it is checking the whole file and highlighting in minimap etc.
    So for highlighting regexps (and possibly other stuff in UI), only highlight on visible page (or up to 2k lines, or up to .25 sec of user time)

regards
Paul H

0 Likes