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

From: Mitchell <>
Date: Thu, 5 Sep 2019 11:06:15 -0400 (EDT)


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.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
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