From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46350: 28.0.50; touchpad-scrolling-eats-lots-of-cpu-samples Date: Sat, 06 Feb 2021 21:02:04 +0200 Message-ID: <838s81nhoz.fsf@gnu.org> References: <83a6shnklg.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7966"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46350@debbugs.gnu.org To: Andrey Orst Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 06 20:03:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1l8SrS-0001yo-Gi for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Feb 2021 20:03:14 +0100 Original-Received: from localhost ([::1]:44428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8SrR-00081V-2b for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Feb 2021 14:03:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8SrG-00081A-LI for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2021 14:03:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l8SrG-0000NL-EB for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2021 14:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l8SrG-0004gw-BB for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2021 14:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Feb 2021 19:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46350 X-GNU-PR-Package: emacs Original-Received: via spool by 46350-submit@debbugs.gnu.org id=B46350.161263812917953 (code B ref 46350); Sat, 06 Feb 2021 19:03:02 +0000 Original-Received: (at 46350) by debbugs.gnu.org; 6 Feb 2021 19:02:09 +0000 Original-Received: from localhost ([127.0.0.1]:46441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8SqO-0004fV-My for submit@debbugs.gnu.org; Sat, 06 Feb 2021 14:02:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8SqM-0004f5-Tg for 46350@debbugs.gnu.org; Sat, 06 Feb 2021 14:02:07 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44347) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8SqH-0008MN-MQ; Sat, 06 Feb 2021 14:02:01 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4536 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l8SqG-0002ht-NE; Sat, 06 Feb 2021 14:02:01 -0500 In-Reply-To: (message from Andrey Orst on Sat, 6 Feb 2021 21:34:29 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199452 Archived-At: > From: Andrey Orst > Date: Sat, 6 Feb 2021 21:34:29 +0300 > Cc: 46350@debbugs.gnu.org > > > Please load mwheel.el (NOT the .elc file!), and then profile the slow > > scrolling again and show a fully-expanded profile. That might help us > > understand what part of mwheel-scroll takes the lion's share of CPU > > cycles. > > Here's whole report expanded (btw can't find if there's expand-all feature?): Yes, "C-u RET". > 11593 91% - command-execute > 11549 91% - funcall-interactively > 11542 91% - mwheel-scroll > 11536 91% - let* > 11420 90% - condition-case > 11381 90% - unwind-protect > 11377 90% - let > 11373 90% - cond > 11372 90% - condition-case > 10868 86% - funcall > 324 2% - scroll-down > 263 2% - jit-lock-function > 255 2% - jit-lock-fontify-now > 235 1% - jit-lock--run-functions I cannot make sense out of this: this profile says that funcall takes most of the time, and the function it calls, scroll-down, takes almost no time? Does anyone have any idea what could be going on here? If this is just some artifact of "M-x profile", and most of the time is spent in scroll-down, then I'm not sure what can be done, nor why you see something I don't. Do you use a large frame and/or a small font? And how many mouse-wheel events Emacs receives in your scenario, anyway? Oh, and what happens if you raise gc-cons-threshold to a large value?