From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: emacs-27 d7a4cea: ; Add a new item to TODO Date: Thu, 17 Dec 2020 11:22:49 -0500 Message-ID: References: <20201217142235.14287.97153@vcs0.savannah.gnu.org> <20201217142237.1F01120AE6@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38635"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 17 17:29:44 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kpw9w-0009wM-OC for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Dec 2020 17:29:44 +0100 Original-Received: from localhost ([::1]:46478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpw9v-0006Qd-Pj for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Dec 2020 11:29:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpw3R-0006iw-LS for emacs-devel@gnu.org; Thu, 17 Dec 2020 11:23:02 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpw3J-0005tC-Ri; Thu, 17 Dec 2020 11:22:58 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D6DBE80838; Thu, 17 Dec 2020 11:22:51 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 50021805BE; Thu, 17 Dec 2020 11:22:50 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1608222170; bh=PVXD4o0wtNzC2GqRcLoq+1vxgQKmvsl9eNI3QFVUL1M=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=kQnFYu4sknc4WwUxMaC55rLPNm9FBOZ7G0Jhu7UwBrvin/5wmYbpaHMs5Z06mQ1tS 8U4UXFh5je/A3c8rcMKRVI84lrFojzE979fC5t+IH3q3ev4bnsZs3bHKui9VP88qIS akK4kKEgxE8wVRapQc3Cc6bVxPvFTEEDfSqJDXHUZg5aO5WqpOVsDaPu5gus6tuvWA cQK6fKdcKu8APIH+IcBsf8rmyoFKcwzaTM/WVdPJu5PkUTQ/BL6/xmHIKN4XUpNace K3I06p+HHqhv+z4vFMMlXLeIwpG60OlBDWNATdalG28rIFIi9B4OIMpMGr/RQ8Jsc9 b+IL1ZFPfXFzg== Original-Received: from alfajor (69-165-136-52.dsl.teksavvy.com [69.165.136.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 18B7A1200A1; Thu, 17 Dec 2020 11:22:50 -0500 (EST) In-Reply-To: <20201217142237.1F01120AE6@vcs0.savannah.gnu.org> (Eli Zaretskii's message of "Thu, 17 Dec 2020 09:22:36 -0500 (EST)") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:261119 Archived-At: > +** Make redisplay smarter about which parts to redraw > +Currently, redisplay has only 2 levels of redrawing: either it > +redisplays only the selected window on the selected frame, or it > +redisplays all the windows on all the frames. This doesn't scale well > +when the number of visible frames is large. I don't think that's true: the change I installed some years back (along with the `pre-redisplay-function` and its use for the region highlight) does specifically try and select a particular subset of frames/windows. That's what the `wset_redisplay`, `fset_redisplay` and `bset_redisplay` are about. And indeed `pre-redisplay-function` is passed the specific set of windows that have been found to need a redisplay and this set can be much more varied than what you describe above. > +Currently, two variables are used to make the decision what to > +redisplay: update_mode_lines and windows_or_buffers_changed. There's also a `redisplay` "bit" on frames, windows, and buffer text objects. > +One way of making this change is to go through all the places that set > +update_mode_lines and windows_or_buffers_changed, figure out which > +portions of the Emacs display could be affected by each change, and > +then implement the bitmap which will record each of these affected > +display portions. The logic in redisplay_internal will then need to > +be restructured so as to support this fine-grained redisplay. Indeed, that's very useful and I did use exactly this approach back then (and as the rest of your text describes, there are more opportunities). In order to make this easier I changed the code such that every assignment to those two variable sets it to a different value, and then in at every redisplay cycle are record which value is found by increasing the counter in the corresponding slot of `redisplay--all-windows-cause` and `redisplay--mode-lines-cause`. Stefan