From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21453: When font size is temporarily increased Emacs is slow Date: Mon, 28 Sep 2015 14:57:07 +0300 Message-ID: <837fnaeoz0.fsf@gnu.org> References: <87wpvymwbl.fsf@openmailbox.org> <838u8e5lju.fsf@gnu.org> <877fnxducn.fsf@openmailbox.org> <8337yl3zjy.fsf@gnu.org> <8737yldsye.fsf@openmailbox.org> <83zj0t2hky.fsf@gnu.org> <87io7h9bwq.fsf@openmailbox.org> <83oagphd4i.fsf@gnu.org> <87h9mh1hkj.fsf@openmailbox.org> <831tdlgv51.fsf@gnu.org> <87eghkdt1n.fsf_-_@openmailbox.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1443463330 22419 80.91.229.3 (28 Sep 2015 18:02:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Sep 2015 18:02:10 +0000 (UTC) Cc: 21453@debbugs.gnu.org To: Mark Karpov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 28 20:01:59 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZgckR-0002xJ-5N for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Sep 2015 20:01:59 +0200 Original-Received: from localhost ([::1]:40031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgckQ-0001NA-D8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Sep 2015 14:01:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgX4J-00039Y-AZ for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 07:58:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgX4E-000208-8Y for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 07:58:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgX4E-000204-4s for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 07:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZgX4D-0003SE-V6 for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 07:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Sep 2015 11:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21453 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21453-submit@debbugs.gnu.org id=B21453.144344142313158 (code B ref 21453); Mon, 28 Sep 2015 11:58:01 +0000 Original-Received: (at 21453) by debbugs.gnu.org; 28 Sep 2015 11:57:03 +0000 Original-Received: from localhost ([127.0.0.1]:46276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgX3G-0003QA-ED for submit@debbugs.gnu.org; Mon, 28 Sep 2015 07:57:02 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:46457) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgX3D-0003Pe-4L for 21453@debbugs.gnu.org; Mon, 28 Sep 2015 07:57:00 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NVD00K00Y943600@mtaout25.012.net.il> for 21453@debbugs.gnu.org; Mon, 28 Sep 2015 14:54:07 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVD0043BYE79LA0@mtaout25.012.net.il>; Mon, 28 Sep 2015 14:54:07 +0300 (IDT) In-reply-to: <87eghkdt1n.fsf_-_@openmailbox.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107000 Archived-At: > From: Mark Karpov > Cc: 21453@debbugs.gnu.org > Date: Sun, 27 Sep 2015 17:02:12 +0600 > > The Results > =========== > > Here I post measured times: > > Font Size Time in Seconds > normal 301.423 > +1 1055.157 > -1 487.935 I see something very different on my system, so this could be specific to X or even your font back-end (xft). Here are my times: Font Size Time in Seconds ELisp Fundamental normal 139.9 113.2 +1 140.4 112.2 -1 282.0 126.4 -2 148.8 +2 114.4 The second column of numbers is with the same file, but with font-lock turned off, after rejecting the file-local variables, and in Fundamental mode. As you see, the differences are much smaller in Fundamental mode. This points to face remapping as the possible reason for slower redisplay, at least in my case. When you enlarge or decrease the default font size, Emacs needs to look up the faces in face-remapping-alist each time it needs to redisplay something, which could explain some slowdown. I don't know why the +1 case is so much slower on your system; perhaps you could use some kind of profiler to see what takes most of the time in that case. You could start with the Emacs's built-in profiler, although I doubt it will tell something revealing, because I think the reason is below the level the built-in profiler can look. In any case, I understand now why you perceive the slowdown as significant: if it takes 1000 sec to scroll through a 8000-line file, it means you get just 8 lines-per-second, which is slow enough to annoy. As you see, on my system, I get 5 times faster performance, which is below human annoyance threshold.