Home Download Buy Blog Forum Support

Regex performance

Regex performance

Postby otaku888 on Mon Jul 06, 2009 8:13 am

First off big fan of Sublime and use it every day.

The only pet peeve for me is find and replace performance using regex. I find if I have a file with upwards of 50000 characters and I do a simple newline replace or text substitution on the file, Sublime hangs and does not respond, eventually completes the operation or crashes completely. I've tried the same operations in ultraedit et al and it works in the milliseconds with no problems.

Is this a known issue, or am I doing something silly?
otaku888
 
Posts: 22
Joined: Fri Aug 08, 2008 10:43 am

Re: Regex performance

Postby jps on Mon Jul 06, 2009 12:19 pm

Performance isn't ideal: syntax highlighting data is recalculated after each modification to the buffer, so large find and replaces can be slow. In some cases it can be a big speed gain to switch to using "Plain Text" for the syntax, doing the replacement, then switching back. I realise this isn't great, and there are some things that'll fix it on the todo list, but they aren't scheduled to be done soon.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Regex performance

Postby otaku888 on Mon Jul 06, 2009 5:26 pm

Thanks for the information, I'll try the plain text option to see if it improves matters.
otaku888
 
Posts: 22
Joined: Fri Aug 08, 2008 10:43 am

Re: Regex performance

Postby myel on Fri Jan 08, 2010 5:01 pm

any update on this?

maybe just deactivate syntax highlight automatically/temporary while performing the search/replace operation?
myel
 
Posts: 88
Joined: Sat Mar 22, 2008 11:26 pm

Re: Regex performance

Postby jps on Wed Jan 13, 2010 12:30 pm

Performance should be much better in the current betas, since 20091113 the interaction between regex replacement and syntax highlighting has been removed.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Regex performance

Postby myel on Thu Jan 14, 2010 3:12 pm

for me it is still much faster if i switch to plaintext before the search/replace operation. i only really notice it with big files though...
myel
 
Posts: 88
Joined: Sat Mar 22, 2008 11:26 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 19 guests