Subject: Re: bug#29889: 27.0.50; Slow visual selection

From: Eli Zaretskii <[email-masked]>
Date: Fri, 20 May 2022 15:16:22 +0300

> From: Po Lu <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Fri, 20 May 2022 19:49:19 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > What will happen if the buffer text changes between the time the
> > active region is defined and the time some other program requests the
> > selection?
> 
> Then the new buffer text will be used.

Which is not the expected result.

> But we could always store that text in a temporary buffer, since
> inserting and deleting text from a buffer is much faster (and
> doesn't cons nearly as much as) making a copy of the text each time.

It is true that buffers are cheaper than strings, but they still cons
objects and consume memory.  Buffers are also much more visible to
users than strings.  So I wonder why we should do something as
complicated as creating a temporary buffer.  Why not simply allocate
memory and store the text there, if we indeed care enough about this
issue (do we?).