From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29889: 27.0.50; Slow visual selection Date: Fri, 20 May 2022 15:16:22 +0300 Message-ID: <8335h4bdrd.fsf@gnu.org> References: <87y3lmgphl.fsf@gmail.com> <87zgke601k.fsf@gnus.org> <87leux6jey.fsf@gnus.org> <87y1ywy525.fsf@yahoo.com> <83ee0obh4u.fsf@gnu.org> <87v8u0whj4.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="309"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 29889@debbugs.gnu.org, larsi@gnus.org, m.sujith@gmail.com To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 20 14:17:21 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ns1ZI-000AOe-NC for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 May 2022 14:17:20 +0200 Original-Received: from localhost ([::1]:40426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ns1ZH-0006Z8-4U for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 May 2022 08:17:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ns1Z0-0006Yr-Qb for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 08:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43992) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ns1Z0-0000O2-Ht for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 08:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ns1Z0-0006yB-Aa for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 08:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 May 2022 12:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29889 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 29889-submit@debbugs.gnu.org id=B29889.165304899126736 (code B ref 29889); Fri, 20 May 2022 12:17:02 +0000 Original-Received: (at 29889) by debbugs.gnu.org; 20 May 2022 12:16:31 +0000 Original-Received: from localhost ([127.0.0.1]:37885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns1YV-0006x9-4m for submit@debbugs.gnu.org; Fri, 20 May 2022 08:16:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns1YS-0006wr-Ah for 29889@debbugs.gnu.org; Fri, 20 May 2022 08:16:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47614) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ns1YM-0000El-Uv; Fri, 20 May 2022 08:16:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tgxEOzTd2jU7eFYbhM8Rf2N/vt/90Biijb0RUGX7y7A=; b=fR/xfwKcDbq9 xq3A6y3pe0Erngo62CGx+WkiQJLFD1aLazaUqaF67r2vfPxHcgx+bKr0Fps93lJira4kyrOKmFAem ACLZO04OLDjuFTsfQBoKoOyEplBHlsUpjwXw5w3lyNran6vKl4o5+gayMAQ0ZpMkFXWKqLpfeUrrP 4HNTxQwxa6y8PrJKNNsIooLq+ggueUgIdPUA387BsqiPOUjZLulw2Suv8DtC6Un0wmILZytcE2Y2O fT+cbgCMPJFAF0FnDc0KntgTL+NeKoRsEuuZ4qrzNuA+XPT2SGX5XTp2xm3/NfXoFGhpdnIMLE+Vm k+WCyNnBtAnRmjb8cv4u1g==; Original-Received: from [87.69.77.57] (port=3737 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ns1YM-00076n-E9; Fri, 20 May 2022 08:16:22 -0400 In-Reply-To: <87v8u0whj4.fsf@yahoo.com> (message from Po Lu on Fri, 20 May 2022 19:49:19 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232747 Archived-At: > From: Po Lu > Cc: larsi@gnus.org, m.sujith@gmail.com, 29889@debbugs.gnu.org > Date: Fri, 20 May 2022 19:49:19 +0800 > > Eli Zaretskii 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?).