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#15555: Re: bug#15555: 24.3; Bidirectional display very slow with long lines Date: Tue, 18 Feb 2014 19:47:17 +0200 Message-ID: <8361oc71p6.fsf@gnu.org> References: <83wqlo461e.fsf@gnu.org> <8338obskk4.fsf@gnu.org> <83iox6qt1t.fsf@gnu.org> <53035588.3080705@dev.rtsoft.ru> <53036EBA.4060104@yandex.ru> <83eh3075ih.fsf@gnu.org> <530399B6.1090709@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1392746056 14722 80.91.229.3 (18 Feb 2014 17:54:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Feb 2014 17:54:16 +0000 (UTC) Cc: 15555@debbugs.gnu.org To: Dmitry Antipov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 18 18:54:23 2014 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 1WFos7-0003Zv-86 for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 18:54:19 +0100 Original-Received: from localhost ([::1]:52424 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFos6-0004f9-Ir for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 12:54:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WForv-0004bH-JQ for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 12:54:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WForo-0004OF-Ul for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 12:54:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WForo-0004Ny-Oi for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 12:54:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WFom2-0006sI-03 for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 12:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Feb 2014 17:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15555 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15555-submit@debbugs.gnu.org id=B15555.139274563826366 (code B ref 15555); Tue, 18 Feb 2014 17:48:01 +0000 Original-Received: (at 15555) by debbugs.gnu.org; 18 Feb 2014 17:47:18 +0000 Original-Received: from localhost ([127.0.0.1]:58757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFolJ-0006rC-K9 for submit@debbugs.gnu.org; Tue, 18 Feb 2014 12:47:18 -0500 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:44957) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFolG-0006qr-OI for 15555@debbugs.gnu.org; Tue, 18 Feb 2014 12:47:15 -0500 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N1700D00D6V0D00@mtaout28.012.net.il> for 15555@debbugs.gnu.org; Tue, 18 Feb 2014 19:47:52 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N170030SDFSRYA0@mtaout28.012.net.il>; Tue, 18 Feb 2014 19:47:52 +0200 (IST) In-reply-to: <530399B6.1090709@yandex.ru> 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:85838 Archived-At: > Date: Tue, 18 Feb 2014 21:34:46 +0400 > From: Dmitry Antipov > CC: 15555@debbugs.gnu.org > > On 02/18/2014 08:24 PM, Eli Zaretskii wrote: > > > If you show me where these calls are made, I might be able to say > > something intelligent about that. And maybe we could even discuss the > > issue and find some clever solution, if it exists. > > (gdb) b bidi.c:669 ;;; at xmalloc > Breakpoint 1 at 0x500890: file ../../trunk/src/bidi.c, line 669. > (gdb) b bidi.c:756 ;;; at xfree > Breakpoint 2 at 0x500b55: file ../../trunk/src/bidi.c, line 756. > (gdb) r -Q /tmp/4000.txt > > In 4000.txt, eval (goto-char 2769), then press up arrow ==> > > Breakpoint 1, bidi_shelve_cache () at ../../trunk/src/bidi.c:669 > 669 databuf = xmalloc (alloc); > (gdb) p alloc > $1 = 292820 ;;; ~290K > (gdb) bt 8 > #0 bidi_shelve_cache () at ../../trunk/src/bidi.c:669 > #1 0x00000000004518d2 in move_it_in_display_line_to (it=0x7fffffff9b60, to_charpos=2769, to_x=0, op=(MOVE_TO_X | MOVE_TO_POS)) > at ../../trunk/src/xdisp.c:8339 > #2 0x00000000004542d7 in move_it_to (it=0x7fffffff9b60, to_charpos=2769, to_x=-1, to_y=593, to_vpos=-1, op=10) > at ../../trunk/src/xdisp.c:8941 > #3 0x000000000043a193 in pos_visible_p (w=0x10e6518, charpos=2769, x=0x7fffffffa93c, y=0x7fffffffa938, rtop=0x7fffffffa94c, > rbot=0x7fffffffa948, rowh=0x7fffffffa944, vpos=0x7fffffffa940) at ../../trunk/src/xdisp.c:1409 > #4 0x00000000004aba8c in Fpos_visible_in_window_p (pos=..., window=..., partially=...) at ../../trunk/src/window.c:1812 > #5 0x000000000057f82b in Fposn_at_point (pos=..., window=...) at ../../trunk/src/keyboard.c:10730 > #6 0x000000000060cf02 in Ffuncall (nargs=1, args=0x7fffffffab10) at ../../trunk/src/eval.c:2818 > #7 0x000000000065681f in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=2, args=0x7fffffffb3b0) > at ../../trunk/src/bytecode.c:919 > (More stack frames follow...) > (gdb) c > Continuing. > > Breakpoint 4, bidi_unshelve_cache (databuf=0x7fffe1a16010, just_free=true) at ../../trunk/src/bidi.c:756 > 756 xfree (p); > > etc. I can even do: > > (gdb) c 1000 > Will ignore next 999 crossings of breakpoint 1. Continuing. > > Breakpoint 4, bidi_unshelve_cache (databuf=0x7fffe19ce010, just_free=true) at ../../trunk/src/bidi.c:756 > 756 xfree (p); > > and the cursor is not moved yet. Thanks. That's the "infloop" I described in my other message. It should disappear if you try one of the "remedies" I described there.