From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3 Date: Thu, 09 Apr 2020 10:46:02 +0300 Message-ID: <83v9m9nltx.fsf@gnu.org> References: <20200403174757.GA8266@ACM> <20200404104553.GA5329@ACM> <07fe3b69-3ab2-3173-0696-cb17809e2b91@gmx.at> <83blo7v68b.fsf@gnu.org> <1845d7aa-9ae4-3d95-6a30-c7b1d8d8adec@gmx.at> <83a73qt6zs.fsf@gnu.org> <97c4254e-ff43-8402-3645-f713c408c245@gmx.at> <83y2r9syby.fsf@gnu.org> <20200405195753.GG5049@ACM> <542b48ba-4dfa-820f-ba50-4b147ab6d8e2@yandex.ru> <0a5f70aa-4985-8f8d-81d6-6ac4a60a94f9@yandex.ru> <838sj8sphk.fsf@gnu.org> <834ktwsmfw.fsf@gnu.org> <83imibqsmm.fsf@gnu.org> <478c2aab-a5fc-61c2-02e2-2d9846b95273@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="69920"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, rrandresf@gmail.com, emacs-devel@gnu.org, rms@gnu.org, rudalics@gmx.at To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 09 09:47:08 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 1jMRu0-000I6G-Em for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Apr 2020 09:47:08 +0200 Original-Received: from localhost ([::1]:44596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMRtz-0007dy-Gd for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Apr 2020 03:47:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44776) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMRtP-0007CL-Or for emacs-devel@gnu.org; Thu, 09 Apr 2020 03:46:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jMRtO-0005dI-JR; Thu, 09 Apr 2020 03:46:30 -0400 Original-Received: from [176.228.60.248] (port=1819 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jMRtH-0002iL-3w; Thu, 09 Apr 2020 03:46:23 -0400 In-Reply-To: <478c2aab-a5fc-61c2-02e2-2d9846b95273@yandex.ru> (message from Dmitry Gutov on Thu, 9 Apr 2020 03:32:13 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:246702 Archived-At: > Cc: acm@muc.de, rudalics@gmx.at, rrandresf@gmail.com, rms@gnu.org, > emacs-devel@gnu.org > From: Dmitry Gutov > Date: Thu, 9 Apr 2020 03:32:13 +0300 > > > Of course, if fast-but-imprecise-scrolling makes the job of scroll > > commands so much easier that Emacs is capable of keeping up with the > > keyboard auto-repeat rate, then every screen-full you scroll through > > _will_ be displayed, and therefore will be fontified by the calls to > > jit-lock from redisplay itself -- and that will again make scrolling > > slower. So fast-but-imprecise-scrolling is most efficient when it > > makes scroll commands faster, but not too fast... > > In my testing with an '-Og -g3' build (from emacs-27; master is much > faster with the recent tweaks) it allows for redisplay once every > several screenfuls or so. So it seems like a good tradeoff, in those > particular conditions. Tradeoffs of what? You are probably scrolling in a buffer that uses a single font all over, with fontifications changing only the colors. While this is a very frequent scenario, it is by no means the only one Emacs needs to support. Imagine a buffer where many lines have characters that become much taller than the default after fontifications -- in such a buffer fast-but-imprecise-scrolling will cause you get to the wrong screenful, because it will consider each character to be displayed with the default face. > - if (whole && Vfast_but_imprecise_scrolling) > + if (whole && input_was_pending) > specbind (Qfontification_functions, Qnil); I don't like this, because it's unconditional. In my view, the tradeoff proposed by fast-but-imprecise-scrolling is a bad tradeoff, something I personally will never take, even if Emacs locks up for many seconds in some situation. If you suggest to _add_ the pending-input condition to fast-but-imprecise-scrolling being set, then I'm okay with that optional behavior being smarter (assuming this doesn't have downsides we aren't aware of yet), if users of fast-but-imprecise-scrolling agree with it. More generally, I don't think I see how even this proposal makes something clearly better. We already have jit-lock-defer-time; people who have slow machines are advised to set that to something like 0.1 or 0.25, and they can have scrolling that is way faster than with fast-but-imprecise-scrolling (and with the same tradeoff of making scrolling "imprecise"). Why invent kludges when we already have a better solution that was there since Emacs 21?