From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Scrolling commands and skipping redisplay Date: Sat, 11 Apr 2020 13:21:26 +0000 Message-ID: <20200411132126.GA6682@ACM> References: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="5828"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, rrandresf@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: Dmitry Gutov , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 11 15:28:50 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 1jNGBl-0001Ps-Fn for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 15:28:49 +0200 Original-Received: from localhost ([::1]:51994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNGBk-0005E1-IT for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 09:28:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35134) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNGBB-0004ej-L8 for emacs-devel@gnu.org; Sat, 11 Apr 2020 09:28:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNGBA-0001oT-H3 for emacs-devel@gnu.org; Sat, 11 Apr 2020 09:28:13 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:33969 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1jNGBA-0001ny-79 for emacs-devel@gnu.org; Sat, 11 Apr 2020 09:28:12 -0400 Original-Received: (qmail 25328 invoked by uid 3782); 11 Apr 2020 13:21:30 -0000 Original-Received: from acm.muc.de (p2E5D55B6.dip0.t-ipconnect.de [46.93.85.182]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sat, 11 Apr 2020 15:21:26 +0200 Original-Received: (qmail 7092 invoked by uid 1000); 11 Apr 2020 13:21:26 -0000 Content-Disposition: inline In-Reply-To: <478c2aab-a5fc-61c2-02e2-2d9846b95273@yandex.ru> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 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:246831 Archived-At: On Thu, Apr 09, 2020 at 03:32:13 +0300, Dmitry Gutov wrote: [ .... ] I think it would be useful to have a quick summary of six possibilities for fast scrolling of a buffer caused by holding down C-v. I observed these phenomena on a master branch build with CFLAGS=-Og -g3 before the recent optimisations for this. I'm running on a Linux virtual terminal, with 65 lines of text fitting in a window. In all the tests I held down for a few seconds, then let it go. ( is equivalent to C-v.) Disclosure: I implemented fast-but-imprecise-scrolling. (i) (eq jit-lock-defer-timer nil) a - f-b-i-s nil: One or two screenfuls get displayed; then Emacs appears to hang. On releasing Emacs does nothing and is unresponsive for a long time (up to 10 or 20 seconds). It then displays the position it has reached. b - f-b-i-s t: Emacs continually displays a different screen, always fontified, but jerkily. On releasing , one or two more screens are displayed, and Emacs becomes responsonsive again almost instantly. (ii) (eq jit-lock-defer-timer 0) a - f-b-i-s nil: Screenfuls get continually displayed, all fontified, but jerkily. On releasing , the scrolling continues for a long time (10 or 20 seconds), and the last screen is displayed, before Emacs becomes responsive to user input. b - f-b-i-s t: Screenfuls get continually displayed, but more slowly that in (ii)a, and jerkily. Screenfuls are partially fontified when they are first displayed, and the fontification gets completed an instant later, before scrolling further. On releasing , Emacs becomes responsive again almost instantly. (iii) (eq jit-lock-defer-time 0.1) a - f-b-i-s nil: Screenfuls are displayed steadily and rapidly, unfontified. On releasing the key, the scrolling stops instantly, and there is a longish (0.1s) delay until the same screen gets redisplayed fontified. Emacs becomes responsive instantly. b - f-b-i-s t: Indistinguishable from (iii)(a). My personal view: As defaults, I think (i)a and (ii)a are bad, due to the long intervals Emacs appears to have hung in. Of (i)b and (ii)b, I think (i)b is better, since it avoids the "twinkling" of (ii)b. I dislike (iii)a,b because of the appearance of non-fontified screens, but particularly because the last screen gets fontified in situ after first appearing unfontified. I think the non-fontification looks poor to a user, even though the scrolling is smooth. If it were up to me to chose a default setting, I would prefer (i)b, closely followed by (ii)b. -- Alan Mackenzie (Nuremberg, Germany).