From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72830: Big rectangular selections are slow Date: Thu, 29 Aug 2024 16:04:57 -0400 Message-ID: References: <3F6C6CAB-8CD1-4336-B1D1-949E716139FE@gmail.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4024"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 72830@debbugs.gnu.org, Juri Linkov To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 29 22:06:22 2024 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 1sjlPR-0000p8-CY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Aug 2024 22:06:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjlPF-0002vo-FQ; Thu, 29 Aug 2024 16:06:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjlPD-0002vR-DL for bug-gnu-emacs@gnu.org; Thu, 29 Aug 2024 16:06:07 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sjlPC-0004u3-Cd for bug-gnu-emacs@gnu.org; Thu, 29 Aug 2024 16:06:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=DIhglyy4zmK5wcmJUkF+IW83JmLqVStoirqNJiNfOVw=; b=E5jWVSfpHI4I63Z8Q7RsdXVNrrqOrxUyUm/2VCQqgLoWsXa40f1S+enog5AzypyVmk67nS9nUraBUT/gOlEzh6dEGo1uORvSrljC+Js0q54Jr5QgO+0g2nIpktaMhXG2j8eQShA1uuJU1fJuC4p5eleyJtHKLtwyai+Uh2vCxxH/G7iefrnfqaCju9/rMel6Sj1njyluMfQc/SV2KGfjMYQyINNBLUzya2pB1XaotcE5jiRjI0W9ZVLO31E7QY8q/etG/jXYpNDr5WGBKCn4pz9+VFMcmsrK2Zo+iHX/2Vy9AOG+reSpsFy7p9ON3EE0hubR2iaCyHxCkeprsM88BQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sjlQ6-00033S-3T for bug-gnu-emacs@gnu.org; Thu, 29 Aug 2024 16:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Aug 2024 20:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72830 X-GNU-PR-Package: emacs Original-Received: via spool by 72830-submit@debbugs.gnu.org id=B72830.172496196511656 (code B ref 72830); Thu, 29 Aug 2024 20:07:02 +0000 Original-Received: (at 72830) by debbugs.gnu.org; 29 Aug 2024 20:06:05 +0000 Original-Received: from localhost ([127.0.0.1]:52172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjlPB-00031w-36 for submit@debbugs.gnu.org; Thu, 29 Aug 2024 16:06:05 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjlP9-00030z-8H for 72830@debbugs.gnu.org; Thu, 29 Aug 2024 16:06:04 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B28F24445E4; Thu, 29 Aug 2024 16:05:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1724961898; bh=qHT4BPE/dO/bd4GmJXz0beSAAWME12s49QBH1nPV3P8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=EoGCaOHCxGhY04ZQo7evArFTKDzPbPnkyr90hUCk7S7P24pA80RKkQvXwxIhVaZ7T GRTnZzbxKgZHyPjLWczSEDsTk07nO/Jmgfbd/YGtyv4aRSo1Mf8vR1TD31GDRiRcU4 8F60fmtvMRYghxfx3f6xfZ0kwBuZmdoKdXMSWkjy0JwU690vb54i5WUl7SPIR8S4/Y /gbgw21d6DbgSy8sALNAjKoH6Rup5tlx7tahpWG40JJDF53tCvHw/bG65y6tisF4np 76S6Azpdev8xMV+qKBFsirEjhGHCszLy6B2p/gJezkrWYrMsJ7F8HbF0j8RX3vXt1i VoaW60I4QAeig== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D2FAD4445E5; Thu, 29 Aug 2024 16:04:58 -0400 (EDT) Original-Received: from pastel (unknown [216.154.9.87]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9FDF612024C; Thu, 29 Aug 2024 16:04:58 -0400 (EDT) In-Reply-To: <3F6C6CAB-8CD1-4336-B1D1-949E716139FE@gmail.com> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Thu, 29 Aug 2024 10:09:06 +0200") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290944 Archived-At: >> There might be some remaining issues with (re)running the >> `pre-redisplay-function(s)` when redisplay forces a change in >> `window-start` (or in the unlikely case where the highlighting moves the >> `window-end` further), but these are things we need to fix anyway. > That's what I wondered how to deal with. I agree we can probably assume that > highlighting won't affect the viewport in any substantial way. > To be clear, just using the (inaccurate) window-start and window-end to clip > the setting of highlight overlays works very well and with excellent speed > until the viewport moves, in which case it no longer does. "The viewport moves" is what I referred to as "when redisplay forces a change in `window-start`" (there are actually many cases where the viewport moves before redisplay is invoked, in which case "just using the (inaccurate) window-start and window-end to clip the setting of highlight overlays works very well"). We should investigate the case(s) where it doesn't work well and fix them (not by changing your `pre-redisplay-function` but by re-running that hook), because these cases likely affect other users of this hook (such as the normal region highlighting). >> There are further issues when several windows display the buffer. > Are there? The highlight overlay is set with a `window` parameter that keeps > it visible in one window only. Ah, great, then. I didn't remember this. >> We could also move some of the work to jit-lock, which would have the >> advantage that it would additionally be able to skip over (large) chunks >> that are marked as `invisible`. > Not sure how this would work. Isn't it guided by (comparatively > persistent) `fontified` properties? We'd set that property to nil. [ See the recentish discussion about how to change jit-lock so that it can be told to flush only some of its backends. ] Stefan