From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrey Orst Newsgroups: gmane.emacs.bugs Subject: bug#46350: 28.0.50; touchpad-scrolling-eats-lots-of-cpu-samples Date: Sun, 7 Feb 2021 21:33:25 +0300 Message-ID: References: <83a6shnklg.fsf@gnu.org> <838s81nhoz.fsf@gnu.org> <8335y9neut.fsf@gnu.org> <83h7mnn4y6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26272"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46350@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 07 19:34:13 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 1l8osv-0006iO-4X for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Feb 2021 19:34:13 +0100 Original-Received: from localhost ([::1]:37530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8osu-00086U-6Y for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Feb 2021 13:34:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8osk-00086M-A8 for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 13:34:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37201) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l8osk-0000U2-32 for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 13:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l8osk-000420-0A for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 13:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrey Orst Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Feb 2021 18:34:01 +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.161272282515474 (code B ref 46350); Sun, 07 Feb 2021 18:34:01 +0000 Original-Received: (at 46350) by debbugs.gnu.org; 7 Feb 2021 18:33:45 +0000 Original-Received: from localhost ([127.0.0.1]:48747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8osT-00041W-Aa for submit@debbugs.gnu.org; Sun, 07 Feb 2021 13:33:45 -0500 Original-Received: from mail-pl1-f172.google.com ([209.85.214.172]:34075) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8osQ-00041I-Vx for 46350@debbugs.gnu.org; Sun, 07 Feb 2021 13:33:44 -0500 Original-Received: by mail-pl1-f172.google.com with SMTP id u15so6653621plf.1 for <46350@debbugs.gnu.org>; Sun, 07 Feb 2021 10:33:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1mEc/0bwknwJhqOuDTEi1uubS+UN1YfPrrHVEF1PP1E=; b=va4k0Tmq4hoyDfqHwH1IZIFEM0UAlxIfPYj8tL8xd5knDcvGQMZ5Vu7V3RI8cIY+fI lOLSe3k1dha6Z344OcG9GRdRGZTpbXNPOlfA7A0ZKmCJC4P3s8C0ihyWgZqmdcnGkd6M 7X60iVw+/us/bhkSmoo8bZPjjB+oKPb2xH8dq25tEa3wSSSFwq9JhaxS/pc+iG/u0AVD 2tCNH/29SSbcwaVD7NI63szCBgMwUE7j/VkpSC8Izu2ziPLXlTAUEeAGPl4dt/piZCOO szcIDiB3xxy25ZsD5xgdXUwnn3csqSJrHaavZ36O0Qkv68LlDZKqxg02c/myzOSKbshg Lwbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1mEc/0bwknwJhqOuDTEi1uubS+UN1YfPrrHVEF1PP1E=; b=hD+GN65fkMqkN5RfDFW3VEYJFBuiCzwmoaJR0fTPgKHwbjH3SVNKx1D/e3YV1Kukxy ZoimoaZUnKuhjMiDLORJjCz8eaZGMZPNUsoIgCKtc0RDtUUMMb1FA9z4PkXkvZEX8D6S vou//s60wSo7tSDJ9EIDYgKfVDt/FFAjB9jefpyIInuaSThs91xgqnM6PZAQBmO9Ina+ 0pzW/natBlzWgdQ4dqGFRmtaZqMAwwTfFGz/RyW3kVpoehoTeGtRNm8vNDIlct9eWHaW 612UhhY63z2O1N3rAIjuoEz/nivkBLv1HLA/DT6ORxMl9iSRqiPdsEiFIa64CT5afTtb juRQ== X-Gm-Message-State: AOAM530rf5ARuf//NWRWnCsDYntFiI4faDJT/LUIB4TWOSTMdern48SA t/t6keED4+3hdXaL2bWDrFFrce7KlO3oC8cg3TM= X-Google-Smtp-Source: ABdhPJxJcHCYCg/tUJCes3AHAsDep+1yE2zhCr1Ye4tHZbRFaVDITK79nb6KQCJcMAzLaA7KzH2MBu+U+k2TOrDtF5g= X-Received: by 2002:a17:90a:4092:: with SMTP id l18mr4408493pjg.1.1612722816972; Sun, 07 Feb 2021 10:33:36 -0800 (PST) In-Reply-To: <83h7mnn4y6.fsf@gnu.org> 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:199535 Archived-At: On Sun, Feb 7, 2021 at 8:49 PM Eli Zaretskii wrote: > 1350 calls during what time, approximately? less than a second? If you've watched the video I've linked you can get a sense of what time it takes -- about 15 seconds. Or more if I continue swyping rapidly, since Emacs just sits at the bottom eating all input until I stop. Touchpad generates about 20-30 inputs per swipe, so I think ~90 inputs is maximum human can produce in 1 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. Can Emacs poll mouse events less frequently? Maybe some libinput stuff needs tweaking? > > > 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 =E2=89=85 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? There I was talking about progressive speed turned on, as it builds up almost instantly with my touchpad producing 30 inputs per swipe. --=20 Best regards, Andrey Listopadov