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: emacs rendering comparisson between emacs23 and emacs26.3 Date: Tue, 7 Apr 2020 11:47:01 +0000 Message-ID: <20200407114701.GB4009@ACM> References: <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> <6d234b0b-72e4-5f86-4bd0-09437471ac92@gmx.at> 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="674"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , rrandresf@gmail.com, emacs-devel@gnu.org, rms@gnu.org, Dmitry Gutov To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 07 13:48:31 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 1jLmiV-000Y4t-6D for ged-emacs-devel@m.gmane-mx.org; Tue, 07 Apr 2020 13:48:31 +0200 Original-Received: from localhost ([::1]:45846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLmiT-0007G8-6r for ged-emacs-devel@m.gmane-mx.org; Tue, 07 Apr 2020 07:48:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55658) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLmhA-0006Zw-5B for emacs-devel@gnu.org; Tue, 07 Apr 2020 07:47:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLmh9-0000xG-0c for emacs-devel@gnu.org; Tue, 07 Apr 2020 07:47:07 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:53256 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1jLmh8-0000uX-MC for emacs-devel@gnu.org; Tue, 07 Apr 2020 07:47:06 -0400 Original-Received: (qmail 23759 invoked by uid 3782); 7 Apr 2020 11:47:03 -0000 Original-Received: from acm.muc.de (p4FE15BAB.dip0.t-ipconnect.de [79.225.91.171]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Tue, 07 Apr 2020 13:47:01 +0200 Original-Received: (qmail 4315 invoked by uid 1000); 7 Apr 2020 11:47:01 -0000 Content-Disposition: inline In-Reply-To: <6d234b0b-72e4-5f86-4bd0-09437471ac92@gmx.at> 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:246589 Archived-At: Hello, Martin. On Tue, Apr 07, 2020 at 10:31:08 +0200, martin rudalics wrote: > >> Or, alternatively, (setq fast-but-imprecise-scrolling t). This var seems > >> like a good idea in general, so we might consider going further with it. > > Try this: > > diff --git a/src/window.c b/src/window.c > > index 8cdad27b66..b23ae41aba 100644 > > --- a/src/window.c > > +++ b/src/window.c > > @@ -5475,7 +5475,9 @@ window_scroll (Lisp_Object window, EMACS_INT n, bool whole, bool noerror) > > wset_redisplay (XWINDOW (window)); > > - if (whole && Vfast_but_imprecise_scrolling) > > + if (Vfast_but_imprecise_scrolling > > + && (whole > > + || EQ (Vthis_command, Qmwheel_scroll))) > > specbind (Qfontification_functions, Qnil); > > /* On GUI frames, use the pixel-based version which is much slower > > @@ -8173,6 +8175,7 @@ syms_of_window (void) > > DEFSYM (Qmode_line_format, "mode-line-format"); > > DEFSYM (Qheader_line_format, "header-line-format"); > > DEFSYM (Qtab_line_format, "tab-line-format"); > > + DEFSYM (Qmwheel_scroll, "mwheel-scroll"); > > DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function, > > doc: /* Non-nil means call as function to display a help buffer. > > This eliminates all the delay I formerly saw while mouse scrolling as > > fast as possibly. > I tried that now and it makes no noticeable difference here. Maybe I > did something wrong - all I checked via GDB was that it does perform > the specbinding. Maybe that's not sufficient. That's not so good. The way it works is by bypassing the fontification in the scrolling code (which is only there to calculate how many lines to scroll, particularly for variable height fonts). The only fontification should happen for redisplay, and that only for when there's no input event waiting. So if all works well, only isolated small segments of the buffer (screenfuls) get fontified and displayed and no long queue of buffer portions for fontification should build up. I don't know why it's not working for you. > martin -- Alan Mackenzie (Nuremberg, Germany).