Re: [code] Sometimes replacing in textadept is too slow

From: Mitchell <m.att.foicica.com>
Date: Thu, 5 Sep 2019 11:06:15 -0400 (EDT)

Hi,

On Thu, 5 Sep 2019, Alexander Misel wrote:

> I wanted to replace all occurences of a word in a single-line file (no line breaks), like raw JSON. When the word only occurs a few times, the speed is OK. But when it cames to a lot of occurences, it became slow and unresponsive. For example the attached file, replacing 'article' to 'art'.
>
> I also tried the terminal method
> sed -i s/article/art/g pop.txt
> and it finished within a second.
>
> So I wonder if it could speed up in Textadept.

When Textadept replaces text, it has to redraw the line, which includes calculating character positions. For long lines this will take a while, even if the lines are wrapped. Unfortunately, I don't see a way to accomplish this well. In this case, Textadept is not the proper tool for the job.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 05 Sep 2019 - 11:06:15 EDT

This archive was generated by hypermail 2.2.0 : Fri 06 Sep 2019 - 06:54:03 EDT