emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs rendering comparisson between emacs23 and emacs26.3


From: Alan Mackenzie
Subject: Re: emacs rendering comparisson between emacs23 and emacs26.3
Date: Tue, 7 Apr 2020 11:47:01 +0000

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).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]