From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Long lines and bidi [Was: Re: bug#13623: ...] Date: Fri, 08 Feb 2013 17:33:47 +0400 Message-ID: <5114FEBB.8020201@yandex.ru> References: <877gmp5a04.fsf@ed.ac.uk> <83vca89izh.fsf@gnu.org> <5110906D.7020406@yandex.ru> <83fw1aac3d.fsf@gnu.org> <51120360.4060104@yandex.ru> <51127363.5030203@yandex.ru> <834nhp9u9j.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1360330465 8831 80.91.229.3 (8 Feb 2013 13:34:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Feb 2013 13:34:25 +0000 (UTC) Cc: Emacs development discussions To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 08 14:34:42 2013 Return-path: Envelope-to: ged-emacs-devel@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 1U3o6D-0003gJ-U9 for ged-emacs-devel@m.gmane.org; Fri, 08 Feb 2013 14:34:42 +0100 Original-Received: from localhost ([::1]:33018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3o5v-00026o-0p for ged-emacs-devel@m.gmane.org; Fri, 08 Feb 2013 08:34:23 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3o5s-00026X-F6 for emacs-devel@gnu.org; Fri, 08 Feb 2013 08:34:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3o5r-0007f1-Dc for emacs-devel@gnu.org; Fri, 08 Feb 2013 08:34:20 -0500 Original-Received: from forward5.mail.yandex.net ([2a02:6b8:0:602::5]:49085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3o5p-0007eI-0m; Fri, 08 Feb 2013 08:34:17 -0500 Original-Received: from smtp3.mail.yandex.net (smtp3.mail.yandex.net [77.88.46.103]) by forward5.mail.yandex.net (Yandex) with ESMTP id 005CD1200FB0; Fri, 8 Feb 2013 17:33:47 +0400 (MSK) Original-Received: from smtp3.mail.yandex.net (localhost [127.0.0.1]) by smtp3.mail.yandex.net (Yandex) with ESMTP id C7F441BA034A; Fri, 8 Feb 2013 17:33:47 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp3.mail.yandex.net (nwsmtp/Yandex) with ESMTP id XlhG1ASs-XlhS5Qv5; Fri, 8 Feb 2013 17:33:47 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1360330427; bh=M/HFRJvNZz4quDv4oxvZWzooKPXc11xGbrqn5T4gUjQ=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=WFJqqmd8aYmpPgqQTa3zGoA5I169HIXH0Hj6KSD6/1GBI6lm26zAACDi0iakuWsMk Vyxim63WgvR5Jmw4WQg3f+3vI8l59LIgD5RI2wCL8V7daclEVkpZF8g6vSZgJQg2yb Hez65MsX+yaZoSGsyaADyqd9ASiDZpAiS2BDz8NU= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: <834nhp9u9j.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a02:6b8:0:602::5 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156883 Archived-At: On 02/06/2013 10:23 PM, Eli Zaretskii wrote: > Another area of redisplay optimizations would be the infamous > very-long-lines use case. (Personally, I think this one is the single > most important deficiency in the current display engine, by far more > important than any other display problem.) I tried to scroll (down from the beginning and then up from the end) the very pathological file (~150M with just ~500 lines) and got the following profile: 8.59% emacs emacs [.] bidi_resolve_weak 7.92% emacs emacs [.] bidi_level_of_next_char 7.81% emacs emacs [.] get_next_display_element 7.12% emacs emacs [.] move_it_in_display_line_to 6.96% emacs emacs [.] x_produce_glyphs 5.06% emacs libc-2.16.so [.] __memcpy_ssse3_back 4.56% emacs emacs [.] next_element_from_buffer 4.38% emacs emacs [.] bidi_move_to_visually_next 4.26% emacs emacs [.] scan_buffer 3.04% emacs libXft.so.2.3.1 [.] XftCharIndex 2.93% emacs emacs [.] bidi_fetch_char 2.67% emacs emacs [.] bidi_cache_iterator_state 2.61% emacs emacs [.] lookup_glyphless_char_display 2.47% emacs libXft.so.2.3.1 [.] XftGlyphExtents 2.35% emacs emacs [.] bidi_resolve_neutral 1.95% emacs emacs [.] bidi_get_type 1.86% emacs emacs [.] detect_coding 1.70% emacs emacs [.] produce_chars 1.50% emacs emacs [.] bidi_resolve_explicit_1 1.18% emacs emacs [.] get_per_char_metric 1.13% emacs emacs [.] bidi_cache_search.constprop.4 1.01% emacs emacs [.] xftfont_text_extents 0.90% emacs emacs [.] bidi_explicit_dir_char 0.88% emacs emacs [.] bidi_resolve_explicit ... So the first question is: is it feasible/possible/desirable to detect that the buffer has no R2L text at all and automatically force bidi-paragraph-direction to left-to-right and bidi-display-reordering to nil? Dmitry