From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.bugs Subject: bug#29737: 27.0.50; pixel-scroll-mode is laggy Date: Sun, 17 Dec 2017 11:00:45 +0900 (JST) Message-ID: <20171217.110045.719415281082937882.tkk@misasa.okayama-u.ac.jp> References: <83vah6r0dz.fsf@gnu.org> <83shcaqxgm.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Sun_Dec_17_11_00_45_2017_576)--" Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1513475957 30371 195.159.176.226 (17 Dec 2017 01:59:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 17 Dec 2017 01:59:17 +0000 (UTC) Cc: tkk@misasa.okayama-u.ac.jp, valentjedi@gmail.com, 29737@debbugs.gnu.org To: eliz@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 17 02:59:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQOER-0007cI-Je for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Dec 2017 02:59:11 +0100 Original-Received: from localhost ([::1]:52799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQOGP-00086V-Qq for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Dec 2017 21:01:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQOGH-00086M-Gm for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2017 21:01:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQOGE-00005A-DS for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2017 21:01:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57451) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQOGE-0008Vw-7m for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2017 21:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eQOGD-0004lH-VI for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2017 21:01:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tak Kunihiro Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Dec 2017 02:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29737 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29737-submit@debbugs.gnu.org id=B29737.151347605818061 (code B ref 29737); Sun, 17 Dec 2017 02:01:01 +0000 Original-Received: (at 29737) by debbugs.gnu.org; 17 Dec 2017 02:00:58 +0000 Original-Received: from localhost ([127.0.0.1]:37899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQOGA-0004gy-3n for submit@debbugs.gnu.org; Sat, 16 Dec 2017 21:00:58 -0500 Original-Received: from mxl065v65.mxlogic.net ([208.81.65.65]:55638 helo=s14p02o142.mxlogic.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQOG6-0004bl-GG for 29737@debbugs.gnu.org; Sat, 16 Dec 2017 21:00:56 -0500 Original-Received: from unknown [42.127.236.175] (EHLO mlsec.cc.okayama-u.ac.jp) by s14p02o142.mxlogic.net(mxl_mta-8.5.0-1933) over TLS secured channel with ESMTP id 3dfc53a5.0.64709.00-390.137068.s14p02o142.mxlogic.net (envelope-from ); Sat, 16 Dec 2017 19:00:52 -0700 (MST) X-MXL-Hash: 5a35cfd41026ffbe-1dbe1e3ca0101c368ceacf13b6a6d0b713b08ad6 Original-Received: from alml002.ouadm.okayama-u.ac.jp (unknown [42.127.236.168]) by mlsec.cc.okayama-u.ac.jp with smtp id 068f_0ed8_d9672c2f_212d_486d_a004_4d4d54410706; Sun, 17 Dec 2017 11:00:46 +0900 Original-Received: from localhost (p221050-ipngn200207tottori.tottori.ocn.ne.jp [153.182.220.50]) by alml002.ouadm.okayama-u.ac.jp (Postfix) with ESMTPSA id 97CA34C0A71; Sun, 17 Dec 2017 11:00:47 +0900 (JST) In-Reply-To: <83shcaqxgm.fsf@gnu.org> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) X-NAI-Spam-Flag: YES X-NAI-Spam-Level: *********** X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 11 X-NAI-Spam-Rules: 7 Rules triggered TS_MSG_REP_80_512=10, RDF_DTN=0.9, RCVD_BAD_SIP=0.1, EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_FAIL=0, RV6181=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6181> : inlines <6256> : streams <1773333> : uri <2552464> X-AnalysisOut: [v=2.2 cv=HPOzLslv c=1 sm=1 tr=0 a=8LLPK8U+aGQ6qN8QlyMYtQ==] X-AnalysisOut: [:117 a=8LLPK8U+aGQ6qN8QlyMYtQ==:17 a=ocR9PWop10UA:10 a=lRt] X-AnalysisOut: [7f11mc6ihBSKf13gA:9 a=CjuIK1q_8ugA:10 a=EZOsJjc7ARWrgHT_79] X-AnalysisOut: [oA:9] X-Spam: [F=0.5100000000; CM=0.500; MH=0.510(2017121610); S=0.296(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [42.127.236.175] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141192 Archived-At: ----Next_Part(Sun_Dec_17_11_00_45_2017_576)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit > While I see that scrolling became pixel-wise indeed, it is also very > laggy. CPU blows up to 100% and ui hangs and freezes. It works ok if > I scroll slowly though. It happens with all my plugins and > customizations and if I run emacs with -Q flag. My OS is Arch Linux > and I also have HiDPI screen (it's MacBook 11,4, mid-2015). On the previous commit <8eb6870be690128fb1cbc012c55093813c39830c>, I revised two functions. I fixed `pixel-scroll-down' but I broke `pixel-scroll-up'. I apologize for the careless commit. With the current and broken `pixel-scroll-up', when EOB is shown on top of the screen, emacs hangs (or goes in infinite while loop). The pixel-scroll-up should be reverted to commit <1bda71ec3b11eeb4d06c3da094a3cb21bac18d5c>. I'm sending ChangeLog and a patch relative to the current master. * ChangeLog Fix vertical cursor motion in pixel-scroll.el * lisp/pixel-scroll.el (pixel-scroll-up): Do not try to move cursor down when EOB is shown at the top. This function is reverted to commit 1bda71ec3b11eeb4d06c3da094a3cb21bac18d5c. (bug#29737) ----Next_Part(Sun_Dec_17_11_00_45_2017_576)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pixel-scroll.el.diff" diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index f64a439..7024487 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -110,11 +110,11 @@ This is an alternative of `scroll-up'. Scope moves downward." pixel-resolution-fine-flag (frame-char-height)) (pixel-line-height)))) - (while (pixel-point-at-top-p amt) ; prevent too late (multi tries) - (vertical-motion 1)) ; move point downward - (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close - (scroll-up 1) ; relay on robust method - (pixel-scroll-pixel-up amt))))) ; move scope downward + (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close + (scroll-up 1) ; relay on robust method + (while (pixel-point-at-top-p amt) ; prevent too late (multi tries) + (vertical-motion 1)) ; move point downward + (pixel-scroll-pixel-up amt))))) ; move scope downward (defun pixel-scroll-down (&optional arg) "Scroll text of selected window down ARG lines. ----Next_Part(Sun_Dec_17_11_00_45_2017_576)----