From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#26051: 25.1; overlays may make emacs very slow Date: Sat, 11 Mar 2017 08:59:31 +0200 Message-ID: <83h930e1t8.fsf@gnu.org> References: <874lz0o31j.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1489215676 5804 195.159.176.226 (11 Mar 2017 07:01:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Mar 2017 07:01:16 +0000 (UTC) Cc: 26051@debbugs.gnu.org To: ynyaaa@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 11 08:01:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmb1V-0000Mb-G1 for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Mar 2017 08:01:05 +0100 Original-Received: from localhost ([::1]:42187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmb1b-0006xa-KM for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Mar 2017 02:01:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmb1V-0006xT-Rd for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 02:01:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmb1S-0006NY-Kn for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 02:01:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52004) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cmb1S-0006NQ-HK for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 02:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cmb1S-0000UM-6N for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 02:01: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: Sat, 11 Mar 2017 07:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26051 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26051-submit@debbugs.gnu.org id=B26051.14892156041749 (code B ref 26051); Sat, 11 Mar 2017 07:01:02 +0000 Original-Received: (at 26051) by debbugs.gnu.org; 11 Mar 2017 07:00:04 +0000 Original-Received: from localhost ([127.0.0.1]:50203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmb0V-0000Rz-3Q for submit@debbugs.gnu.org; Sat, 11 Mar 2017 02:00:03 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmb0S-0000R9-LL for 26051@debbugs.gnu.org; Sat, 11 Mar 2017 02:00:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmb0K-0005aq-36 for 26051@debbugs.gnu.org; Sat, 11 Mar 2017 01:59:55 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmb0K-0005aj-0O; Sat, 11 Mar 2017 01:59:52 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4541 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cmb0J-00051O-28; Sat, 11 Mar 2017 01:59:51 -0500 In-reply-to: <874lz0o31j.fsf@gmail.com> (ynyaaa@gmail.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:130465 Archived-At: > From: ynyaaa@gmail.com > Cc: 26051@debbugs.gnu.org > Date: Sat, 11 Mar 2017 13:22:48 +0900 > > I don't know what characters are neutral. (I should have said "neutral or weak", sorry.) You can find out this property of a character like this: M-: (get-char-code-property CHAR 'bidi-class) RET where CHAR is the character in question, e.g. ?@ for your first example below. You can find more information about bidirectional character types here: http://unicode.org/reports/tr9/#Bidirectional_Character_Types Any value except L or R from the above expression means the character doesn't have a strong directionality, which requires the display engine to look for directional context needed for correct rendering of the text. And since your buffer also has no empty lines, looking for the beginning of a paragraph is also very time consuming. Lots of overlays just make this preposterously slow rather than merely sluggish, because the built-in fallbacks are tuned for the "normal" use cases, where the number of overlays is much lower. > The form above take a few seconds. > I tried some characters instead of 'a'. Each of them take long time. > "@%d\n" > "?%d\n" > "\u00E1%d\n" ;; LATIN SMALL LETTER A WITH ACUTE > "\u3042%d\n" ;; HIRAGANA LETTER A > "\u4E00%d\n" ;; CJK IDEOGRAPH-4E00 > "\uFF41%d\n" ;; FULLWIDTH LATIN SMALL LETTER A What I see here, with all of the above except the first two, is that what takes a long time is for the code to run; once I see "Done" in the echo area, redisplay takes less than a second. That is in contrast to the original example, and the first 2 above, where "Done" is seen very quickly, and redisplay takes a very long time.