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#10835: 24.0.93; bidi-paragraph-direction slows down Shell mode Date: Sat, 18 Feb 2012 10:49:19 +0200 Message-ID: <83y5s0v84w.fsf@gnu.org> References: <87mx8idnji.fsf@gnu.org> <8762f6dn85.fsf@gnu.org> <837gzlwigg.fsf@gnu.org> <87wr7ljr5g.fsf@gnu.org> <8362f5wc15.fsf@gnu.org> <87y5s0yiwz.fsf@gnu.org> <87y5s0dd6q.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1329555138 1194 80.91.229.3 (18 Feb 2012 08:52:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 18 Feb 2012 08:52:18 +0000 (UTC) Cc: 10835@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 18 09:52:17 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ryg1d-0007VX-JU for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Feb 2012 09:52:13 +0100 Original-Received: from localhost ([::1]:35226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ryg1c-0004nc-Tc for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Feb 2012 03:52:12 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:40047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ryg1W-0004kx-AX for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2012 03:52:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ryg1U-0005fX-8R for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2012 03:52:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ryg1U-0005fT-6l for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2012 03:52:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Ryg3N-0006t5-QT for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2012 03:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Feb 2012 08:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10835 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10835-submit@debbugs.gnu.org id=B10835.132955521126438 (code B ref 10835); Sat, 18 Feb 2012 08:54:01 +0000 Original-Received: (at 10835) by debbugs.gnu.org; 18 Feb 2012 08:53:31 +0000 Original-Received: from localhost ([127.0.0.1]:44379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ryg2s-0006sN-JH for submit@debbugs.gnu.org; Sat, 18 Feb 2012 03:53:30 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:36314) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ryg2p-0006s8-P0 for 10835@debbugs.gnu.org; Sat, 18 Feb 2012 03:53:29 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LZK00600YKKSY00@a-mtaout23.012.net.il> for 10835@debbugs.gnu.org; Sat, 18 Feb 2012 10:51:23 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.150.51]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LZK006B9Z9MTV00@a-mtaout23.012.net.il>; Sat, 18 Feb 2012 10:51:23 +0200 (IST) In-reply-to: <87y5s0dd6q.fsf@gnu.org> 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:56986 Archived-At: > From: Chong Yidong > Cc: 10835@debbugs.gnu.org > Date: Sat, 18 Feb 2012 11:37:33 +0800 > > Chong Yidong writes: > > > I just noticed that when I do `ls --color=no' rather than just `ls', > > insertion and scrolling are very fast. The sluggishness only appears > > when ls color highlighting is enabled. So the inefficiency of > > ansi-color.el, and its use of overlays, seems to play a role. > > I just confirmed that the sluggishness goes away if I change > ansi-color.el to make it use text properties. That figures. bidi.c needs to look up display properties and overlays with display strings, in order to DTRT with their display (they are treated as a single neutral character). So having lots of overlays slows down redisplay a bit more. > Wish I'd remembered to do that before the pretest began. If this is a grave problem, we can still do it now, I think. Or we could use a band-aid, see below. > Roughly what is happening, I think, is that when overlays are heavily > used and there are no paragraph breaks (e.g. from the `time' output), > the bidi code does enough the additional overlay lookups to produce a > noticeable slowdown. Yes, the overlays together with the long search for paragraph beginning probably push the user experience from slightly below the annoyance threshold to just above it. > I'm not sure what's the best fix right now, though. How about setting bidi-paragraph-direction in comint buffers to left-to-right when the locale indicates that use of bidirectional scripts is unlikely? We could use locale-language-names and an additional small database of languages that need bidi, to make that decision. WDYT?