Subject: Re: bug#46350: 28.0.50; touchpad-scrolling-eats-lots-of-cpu-samples

From: Andrey Orst <[email-masked]>
Date: Sun, 7 Feb 2021 20:23:09 +0300

On Sat, Feb 6, 2021 at 11:03 PM Eli Zaretskii <[email-masked]> wrote:
>
> >  And how many mouse-wheel events Emacs receives in your
> >  scenario, anyway?
> >
> > Sorry, how can I check that?
>
> 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.
Adding (sit-for 0) at the start of the function doesn't have any effect.

> 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

-- 
Best regards,
Andrey Listopadov