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#11943: 24.1.50; Emacs unusably slow when looking at large files (bidi support at fault) Date: Sun, 15 Jul 2012 17:47:18 +0300 Message-ID: <83ipdpaxop.fsf@gnu.org> References: <87vchp4zkk.fsf@shorty.local.i-did-not-set--mail-host-address--so-tickle-me> <83k3y5bu7k.fsf@gnu.org> <20120714203103.3a938b51@shorty.local> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1342363701 26615 80.91.229.3 (15 Jul 2012 14:48:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 15 Jul 2012 14:48:21 +0000 (UTC) Cc: 11943-done@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 15 16:48:20 2012 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 1SqQ7Q-0006mS-NO for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Jul 2012 16:48:20 +0200 Original-Received: from localhost ([::1]:44071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqQ7P-0004EZ-Sf for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Jul 2012 10:48:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqQ7K-0004EC-4g for bug-gnu-emacs@gnu.org; Sun, 15 Jul 2012 10:48:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqQ7J-0004BK-3d for bug-gnu-emacs@gnu.org; Sun, 15 Jul 2012 10:48:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqQ7J-0004BF-0K for bug-gnu-emacs@gnu.org; Sun, 15 Jul 2012 10:48:13 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SqQCv-0005UY-SU for bug-gnu-emacs@gnu.org; Sun, 15 Jul 2012 10:54:01 -0400 Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Jul 2012 14:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 11943 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 11943@debbugs.gnu.org, eliz@gnu.org Original-Received: via spool by 11943-done@debbugs.gnu.org id=D11943.134236398921043 (code D ref 11943); Sun, 15 Jul 2012 14:54:01 +0000 Original-Received: (at 11943-done) by debbugs.gnu.org; 15 Jul 2012 14:53:09 +0000 Original-Received: from localhost ([127.0.0.1]:42901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SqQC5-0005TM-5M for submit@debbugs.gnu.org; Sun, 15 Jul 2012 10:53:09 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:41435) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SqQC2-0005TC-7P for 11943-done@debbugs.gnu.org; Sun, 15 Jul 2012 10:53:07 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M7700100I31XV00@a-mtaout23.012.net.il> for 11943-done@debbugs.gnu.org; Sun, 15 Jul 2012 17:47:15 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M77001YSIEPT840@a-mtaout23.012.net.il>; Sun, 15 Jul 2012 17:47:14 +0300 (IDT) In-reply-to: <20120714203103.3a938b51@shorty.local> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:61960 Archived-At: > Date: Sat, 14 Jul 2012 20:31:03 -0700 > From: Dima Kogan > Cc: 11943@debbugs.gnu.org > > > On Sun, 15 Jul 2012 06:04:47 +0300 > > Eli Zaretskii wrote: > > > > > From: Dima Kogan > > > Date: Sat, 14 Jul 2012 17:50:51 -0700 > > > > > > I'm observing that when some large text files are loaded, emacs > > > slows to a crawl. As an example, I have a 14MB file open (with > > > emacs -Q). Every time I do (next-line) or (previous-line) it takes > > > a few seconds. This is a > 2GHz Core2 machine, so there's no reason > > > for this to happen. 'M-x benchmark' says that (previous-line) takes > > > >2s each time. I discovered that if I do (setq > > > >bidi-display-reordering nil) then emacs is snappy > > > again, with previous-line taking <1ms. > > > > > > The specific file I'm using to exhibit the bug consists of many > > > repeated stanzas such as > > > > > > ========================= > > > { > > > {2.222222,2.222222,2.222222,2.2}, > > > {-2.222222,2.222222,2.222222}, > > > {-22.222222,22.222222,2.222222} > > > }, > > > ========================= > > > > > > without the =. Saving a stanza into a file called 'snippet', the > > > 14MB file can be made with > > > > > > $ for i in `seq 17`; do cat snippet snippet > xxx; mv xxx snippet; > > > done > > > > What is the major mode in the buffer where you see this? I mean the > > real-life example where you bumped into this, not the 'snippet' file > > produced by the above. > > fundamental-mode The recommended way to handle such buffers is to set bidi-paragraph-direction to left-to-right. Major modes for editing program source, that inherit from prog-mode, already do that automatically, but fundamental-mode does not (and can not, IMO). That's why I asked you about the major mode. Anyway, to avoid such catastrophic slow-downs, I made a change in the code that determines base paragraph direction, and committed those changes as trunk revision 109098. With those changes, redisplay should be again fast, even with bidi-paragraph-direction at its default nil value. Thanks.