- Subject: [jed-users] Re: del_region() tremendously slow
- From: Ulli Horlacher <framstag@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Jan 2025 08:36:39 +0100
On Mon 2025-01-27 (23:21), John E. Davis wrote:
> Morten Bo Johansen <mbj@xxxxxxxxx> wrote:
>
> > I just happened to stumble into this rather abnormal use case: mark and
> > delete about two million lines in a file. With del_region(), it takes about
> > 8 seconds to do so on my oldish computer. With the competition (Emacs), it
> > happens in the blink of an eye. Why is del_region() so slow?
I have a similar problem with jed in edt mode (yes, I am an old VMS user).
Deleting about (only) 100k lines last virtually forever :-}
> I rewrote the delete_region function to improve its peformance.
> Testing shows that it is now about 150 times faster than before.
Great!
In edt.sl there is:
define edt_cut()
{
variable b;
ifnot (dupmark()) return;
b = whatbuf();
setbuf(edt_pbuf);
erase_buffer();
setbuf(b);
copy_region(edt_pbuf);
del_region();
}
Is here copy_region() the slowing down problem-function?
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: horlacher@xxxxxxxxxxxxxxxxxxxx
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: https://www.tik.uni-stuttgart.de/
REF:<20250128042121.34BE454D2B@xxxxxxxxxxx>
_______________________________________________
For list information, visit <http://jedsoft.org/jed/mailinglists.html>.
[2025 date index]
[2025 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]