GNU bug report logs -
#46350
28.0.50; touchpad-scrolling-eats-lots-of-cpu-samples
Previous Next
Full log
Message #32 received at 46350 <at> debbugs.gnu.org (full text, mbox):
> From: Andrey Orst <andreyorst <at> gmail.com>
> Date: Sun, 7 Feb 2021 20:23:09 +0300
> Cc: 46350 <at> debbugs.gnu.org
>
> > Add a call to 'message' to mwheel-scroll, and have it show a counter
> > that counts up?
>
> I've did as you've suggested. When scrolling buffer of 1405 lines from
> bottom to the top (while emacs is unresponsive) mwheel-scroll function
> seems to be called about ~1351 times. Single fast flick over touchpad
> produces ~40 calls to mwheel-scroll.
1350 calls during what time, approximately? less than a second?
I don't think Emacs can scroll so fast, one line at a time. Note that
when you scroll with the scroll-bar, Emacs doesn't call
scroll-up/down, it just goes to a suitably calculated buffer position.
Which is why scroll-bar scrolling is much faster. But I don't see how
we can do something similar with the mouse-wheel, since it doesn't
allow to calculate the buffer position to go to; Emacs needs to do
that calculation itself, and that what makes the scrolling so much
slower.
> > What is the size of the buffer that it scrolls almost instantly to
> > BOB? How many lines?
>
> 1405 lines. I'm testing this on bundled lisp-mode.el
Which explains why it scrolls in one go: 1405 ≅ 1350.
So, once we've established that the touchpad injects 1-line scroll
requests at such a high rate, what else needs to be investigated here?
This bug report was last modified 4 years and 132 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.