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#9218: 24.0.50; bidi-display-reordering slowdown Date: Tue, 02 Aug 2011 22:25:24 +0300 Message-ID: <83sjpjaa57.fsf@gnu.org> References: <877h6xx96g.fsf@sophokles.streitblatt.de> <83livdartq.fsf@gnu.org> <83k4axare8.fsf@gnu.org> <87bow9vsc9.fsf@sophokles.streitblatt.de> <83hb60c47f.fsf@gnu.org> <87aabsuash.fsf@sophokles.streitblatt.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1312313324 18822 80.91.229.12 (2 Aug 2011 19:28:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2011 19:28:44 +0000 (UTC) Cc: 9218@debbugs.gnu.org To: Florian Beck Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 02 21:28:40 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QoKdr-0000OW-Eh for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2011 21:28:39 +0200 Original-Received: from localhost ([::1]:39866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoKdr-0008Oh-0e for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2011 15:28:39 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoKdo-0008M8-28 for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 15:28:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoKdl-0003hh-5X for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 15:28:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoKdl-0003hS-42 for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 15:28:33 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QoKeE-0001ny-0z; Tue, 02 Aug 2011 15:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Aug 2011 19:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9218-submit@debbugs.gnu.org id=B9218.13123133056896 (code B ref 9218); Tue, 02 Aug 2011 19:29:01 +0000 Original-Received: (at 9218) by debbugs.gnu.org; 2 Aug 2011 19:28:25 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoKdc-0001nB-Ku for submit@debbugs.gnu.org; Tue, 02 Aug 2011 15:28:24 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoKda-0001n3-9c for 9218@debbugs.gnu.org; Tue, 02 Aug 2011 15:28:23 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LPB00900FD0I600@a-mtaout20.012.net.il> for 9218@debbugs.gnu.org; Tue, 02 Aug 2011 22:27:25 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.48.51]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LPB009VVFDOHT00@a-mtaout20.012.net.il>; Tue, 02 Aug 2011 22:27:25 +0300 (IDT) In-reply-to: <87aabsuash.fsf@sophokles.streitblatt.de> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 02 Aug 2011 15:29:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) 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:49830 Archived-At: > From: Florian Beck > Cc: Florian Beck , 9218@debbugs.gnu.org > Date: Mon, 01 Aug 2011 22:38:54 +0200 > > I just don't understand why it has to be that slow. I have paragraphs of > reasonable length. It turns out the problem was with looking for possible display properties and strings (text covered by them is reordered as a single entity). This searched to the end of the humongous buffer every time Emacs needed to determine paragraph direction. There was a cache that should have prevented all such searches but the first one, but Org mode caused that cache to be invalidated due to its display tricks. Plus, since the display is folded, what shows on the screen as 50 innocent lines actually hides 50 paragraphs, which means Emacs did that long search 50 times... To fix this, I dropped the simplistic cache, and instead introduced machinery that searches at most 5K characters forward.