From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Is Emacs buffer scroll/redisplay slow? Date: Sun, 19 Jan 2020 18:02:43 +0200 Message-ID: <83y2u3xwm4.fsf@gnu.org> References: <20200119115146.GA9172@ACM> <834kwrzcrj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="95475"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org To: Fabrice Popineau Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 19 17:03:29 2020 Return-path: Envelope-to: ged-emacs-devel@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 1itD2u-000OiG-JG for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Jan 2020 17:03:28 +0100 Original-Received: from localhost ([::1]:51158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itD2t-0008JG-M4 for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Jan 2020 11:03:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47338) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itD2A-0007WP-21 for emacs-devel@gnu.org; Sun, 19 Jan 2020 11:02:43 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1itD28-0007oN-1D; Sun, 19 Jan 2020 11:02:41 -0500 Original-Received: from [176.228.60.248] (port=3037 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1itD26-0008Td-Vs; Sun, 19 Jan 2020 11:02:39 -0500 In-reply-to: (message from Fabrice Popineau on Sun, 19 Jan 2020 16:34:17 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:244376 Archived-At: > From: Fabrice Popineau > Date: Sun, 19 Jan 2020 16:34:17 +0100 > Cc: acm@muc.de, Emacs developers > > C-n or down arrow In that case, the elapsed time depends on the auto-repeat rate of your keyboard, not just on the Emacs processing time, right? > Also, did you measure the CPU time it took, out of those 35 sec? (I > assume the time you measured was elapsed time, yes?) > > > > .... and it took 45s on Windows/WSL and 35s on Windows/native. > > > > That is slow indeed. > > > > Definitely. > > Not necessarily. The elapsed time has little to do with the speed we > scroll. > > We could expect emacs to be a little bit more reactive here. Please repeat the experiment in a fresh "emacs -Q" right after starting it, then, after you finish scrolling, see what is the amount of CPU time reported by utilities such as PsList. Alternatively, look at the load average value displayed by another Emacs session. In my testing, when I lean on the DOWN arrow, the system load never raises above 0.25, which means 3/4th of the time Emacs is idle. My keyboard's auto-repeat rate is 30 characters per second, which means Emacs uses up about 7 msec (1000 / 30 / 4) to process every DOWN-arrow keypress, and that includes all the redisplay code, JIT font-lock etc. I'm not sure I agree to call this "slow".