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#15390: 24.3; scrolling in emacs,w32 uses 100% cpu Date: Thu, 19 Sep 2013 10:51:44 +0300 Message-ID: <83hadhmepb.fsf@gnu.org> References: <838uyxqndb.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1379577137 31457 80.91.229.3 (19 Sep 2013 07:52:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Sep 2013 07:52:17 +0000 (UTC) Cc: 15390@debbugs.gnu.org To: Zack Stackson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 19 09:52:18 2013 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 1VMZ29-0004SD-GB for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Sep 2013 09:52:17 +0200 Original-Received: from localhost ([::1]:50000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMZ29-0003O9-1s for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Sep 2013 03:52:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMZ20-0003K4-AT for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2013 03:52:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMZ1u-0006Kn-Ex for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2013 03:52:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMZ1u-0006KW-Ak for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2013 03:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VMZ1t-0007ds-MH for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2013 03:52: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: Thu, 19 Sep 2013 07:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15390 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15390-submit@debbugs.gnu.org id=B15390.137957711529364 (code B ref 15390); Thu, 19 Sep 2013 07:52:01 +0000 Original-Received: (at 15390) by debbugs.gnu.org; 19 Sep 2013 07:51:55 +0000 Original-Received: from localhost ([127.0.0.1]:48222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMZ1m-0007dX-2o for submit@debbugs.gnu.org; Thu, 19 Sep 2013 03:51:54 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:41065) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMZ1h-0007dG-NH for 15390@debbugs.gnu.org; Thu, 19 Sep 2013 03:51:51 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MTD007004C4TA00@a-mtaout22.012.net.il> for 15390@debbugs.gnu.org; Thu, 19 Sep 2013 10:51:43 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MTD007ZK4I6PX10@a-mtaout22.012.net.il>; Thu, 19 Sep 2013 10:51:43 +0300 (IDT) In-reply-to: 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: 140.186.70.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:78562 Archived-At: > Date: Wed, 18 Sep 2013 22:53:36 -0500 > From: Zack Stackson > Cc: 15390@debbugs.gnu.org > > On Mon, Sep 16, 2013 at 1:41 AM, Eli Zaretskii wrote: > > > > Mine is 1920x1080 (but I don't think the size matters here, unless you > > are running with the frame maximized, which you didn't say). > > I am running with frame height maximized (1440px), performance with > height set to 720px is not nearly as bad. Sorry, I don't understand what the last part means. Is the 720 pixel size what you get when you invoke Emacs as "emacs -Q"? If not, please let's first talk about what happens in the frame created by "emacs -Q" and not enlarged by any command or mouse gestures. That is what I did to try reproducing your problems. Or are you are saying that the performance problems are only significant in a full-screen frame, and are imperceptible in the frame of the size created by "emacs -Q"? In that case, let's talk _only_ about maximized frames. > Also tested with emacs -Q and setting font to small size, page up > slowness is the same. I don't think the size of the font is a factor, as long as the frame size changes accordingly. What matters is the amount of text Emacs needs to scan and move when scrolling. > > Emacs 24's display performance is sensitive to the paragraph length as > > well. A paragraph start and end are defined for this purpose as empty > > lines. Is it possible that the text files you used didn't have any > > empty lines at all? If so, can you try files that do have empty > > lines? Also try setting bidi-paragraph-direction to left-to-right > > (it's a per-buffer setting, so use setq-default to do that in all > > buffers). > > They did not have any empty lines, adding empty lines made it much faster. "Much faster" as in "like Emacs 23", or even faster than that? I would not expect the latter. > Tried (setq bidi-paragraph-direction 'left-to-right) and (setq-default > bidi-paragraph-direction 'left-to-right), but that did not make it > faster. Did you try this before or after adding empty lines? The effect should be significant only if there are no empty lines. > Emacs 23 is also slow, not as slow as 24, but not much different. > Emacs 22 is very fast, so that's the version I have been using. Emacs 23 started using the Uniscribe font back-end. So please try this: emacs -Q -xrm Emacs.fontBackend:gdi and see if it is much faster with the same frame geometry and font settings, in Emacs 24. > Do bitmap raster fonts take more work than other fonts, maybe that's > part of it? I don't know enough about the Windows font back-ends and drawing APIs to answer that, sorry. > Page up is also slow when editing files with syntax highlighting > (replace.el for example). Is it slow only the first time some screen-full is displayed? That is, if you visit a file, page down several times through it, then go back to the beginning with C-Home, and page down again through the same portions of the file, is the second scroll also slow, or is it much faster? If the latter, this is normal, as Emacs fontifies the text on the fly when it is first displayed, and that takes time. > > In addition, the characters that begin a paragraph might be of > > importance. You say "text file", so I presume that is human-readable > > text, but it could also be a file with many digits and punctuation > > characters -- these make redisplay work harder. > > Yes, there are many numbers and punctuation, just tested with the > following repeated: > > AA3036B2-CCCC DD3036E1-FFF Test text Test text Test text Test text Test "A", the first character of the line, is not a numeric character, so this is not an issue in your case. > But it also happens on syntax highlighted files when using a small font. Syntax highlighting introduces additional factors, see above. So I suggest for now to try only modes that don't highlight text, or even turn off global-font-lock-mode entirely, when testing.