From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Karpov Newsgroups: gmane.emacs.bugs Subject: bug#21453: When font size is temporarily increased Emacs is slow Date: Sun, 27 Sep 2015 17:02:12 +0600 Message-ID: <87eghkdt1n.fsf_-_@openmailbox.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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1443352162 15944 80.91.229.3 (27 Sep 2015 11:09:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Sep 2015 11:09:22 +0000 (UTC) Cc: 21453@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 27 13:09:13 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 1Zg9pP-0005vu-Bu for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Sep 2015 13:09:11 +0200 Original-Received: from localhost ([::1]:56976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zg9pP-0000dV-1T for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Sep 2015 07:09:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zg9pK-0000dG-G8 for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2015 07:09:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zg9pG-0001q8-Ez for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2015 07:09:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zg9pG-0001q2-BU for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2015 07:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zg9pF-0001XV-RC for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2015 07:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark Karpov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Sep 2015 11:09: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.14433521305899 (code B ref 21453); Sun, 27 Sep 2015 11:09:01 +0000 Original-Received: (at 21453) by debbugs.gnu.org; 27 Sep 2015 11:08:50 +0000 Original-Received: from localhost ([127.0.0.1]:45540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zg9p3-0001X5-OQ for submit@debbugs.gnu.org; Sun, 27 Sep 2015 07:08:50 -0400 Original-Received: from smtp12.openmailbox.org ([62.4.1.46]:33227) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zg9p1-0001Ww-S5 for 21453@debbugs.gnu.org; Sun, 27 Sep 2015 07:08:48 -0400 Original-Received: by mail2.openmailbox.org (Postfix, from userid 1004) id 8D7BA2AC0EC5; Sun, 27 Sep 2015 13:08:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1443352126; bh=ATg0X5KvAzhdI/3InuHzmiXW+TNJl6YUGkq24V3CdBE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=M2ueL1HtdtZZIxUCqIgQpqpqvzUl7UY5Vd4NIreeQPIXxnA0uwWP+J3WJUvMkPTf9 /jlnh5GPEz9jG5WDM9FNC5h6Ie10r8Ge6vyHJKlVlsHRZVGIGQ9flhtDpZib/L6YZW DEsmHSsd6C+k2sh5uj6PivsZObP/80Ac99eU5xu4= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1443352115; bh=ATg0X5KvAzhdI/3InuHzmiXW+TNJl6YUGkq24V3CdBE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=F5T8hvXvrt7piwkHPV8m2QE9Rj3WfC7s83nUPP75VguiQ0gCnBC0eCpzIUaRbCCNN 29nKXPBN9b8oIfEFK03UEfLksJGmJnUdMCR/Jf7vOWcz+q1SR9skeI2IGKi7fnEFPf 0TkYdxR7SqRK3NL2Y3MK+X++U8fLkxO5tTSBF2H0= In-Reply-To: <831tdlgv51.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 26 Sep 2015 16:36:26 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) 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:106967 Archived-At: Here I describe my experiment and its outcome. Setting =3D=3D=3D=3D=3D=3D=3D To measure how long it takes to scroll a long buffer from beginning to end with =E2=80=98next-line=E2=80=99 command the following code was evaluat= ed: (defmacro with-timer (title &rest forms) "Run the given FORMS, counting the elapsed time. A message including the given TITLE and the corresponding elapsed time is displayed." (declare (indent 1)) (let ((nowvar (make-symbol "now")) (body `(progn ,@forms))) `(let ((,nowvar (current-time))) (message "%s..." ,title) (prog1 ,body (let ((elapsed (float-time (time-subtract (current-time) ,nowvar)))) (message "%s... done (%.3fs)" ,title elapsed)))))) =20=20 (defun next-line-racer () "Scroll till end of buffer with `next-line' and measure how long it tak= es. =20=20 To make it realistic `next-line' is called interactively." (interactive) (with-timer=20 (while (not (eobp)) (call-interactively #'next-line)))) The file used: https://github.com/Fuco1/smartparens/blob/master/smartparens.el which is 7992 lines long. The Experiment =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The file is opened and cursor is at the beginning of the file. Font size is either altered with =E2=80=98C-x C-=3D=E2=80=99 (increased, denoted in r= esults as +1) or =E2=80=98C-x C--=E2=80=99 (decreased, denoted in results as -1) or not a= ltered at all. No adjustments to compensate number of visible lines were performed in this experiment because I think difference wouldn't be noticeable. Then =E2=80=98M-x next-line-racer=E2=80=99 is called. Emacs seemingly freez= es for some time until it shows the point (cursor) at the end of the buffer and message in mini-buffer displaying time it took to accomplish the scrolling. No demanding processes were run in the background during the experiment. The Results =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Here I post measured times: Font Size Time in Seconds normal 301.423 +1 1055.157 -1 487.935 Hope it helps.