From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Phil Sainty <psainty@orcon.net.nz>,
pieter@vanoostrum.org, 38407@debbugs.gnu.org
Subject: bug#38407: 27.0.50; infinite loop with display of large file without newlines
Date: Mon, 02 Dec 2019 11:27:10 +0100 [thread overview]
Message-ID: <m2immzt43l.fsf@gmail.com> (raw)
In-Reply-To: <lxpnhd9ecn.fsf@cochabamba.vanoostrum.org>
[-- Attachment #1: Type: text/plain, Size: 4927 bytes --]
>>>>> On Sun, 01 Dec 2019 19:45:11 +0200, Eli Zaretskii <eliz@gnu.org> said:
>> However, for me, bidi-inhibit-bpa comprehensively deals to that.
Eli> Down to 1 min here.
Eli> One other observation is that the first time you do that in a session
Eli> after visiting the file, it takes much longer than the subsequent
Eli> times. Here, the second M-> takes 5 min with bidi-inhibit-bpa nil and
Eli> just 17 sec with it non-nil.
Eli> So I think some of this time is spent doing something we do once,
Eli> maybe loading fonts or something (this file has a lot of different
Eli> scripts).
I donʼt see any real difference between the first and second M-> with
bidi-inhibit-bpa t, so I didnʼt benchmark that, but I can if you want.
Eli> It would be interesting to run perf and compare its output with
Eli> bidi-inhibit-bpa nil and non-nil. Maybe the performance hit due to
Eli> visual-line-mode is because of some code that could be optimized, or
Eli> maybe (gasp!) even a bug. The difference between the first and
Eli> subsequent moves is also interesting to time.
Eli> I don't have access to a GUI system where I can run perf, so could
Eli> someone please do these measurements and post the resulting profiles?
Iʼve done two runs, with visual-line-mode enabled, and bidi-inhibit-bpa
t/nil. Gzipped text versions of 'perf report' attached.
(Aside: why does char_table_ref check ASCII_CHAR_P again, when
CHAR_TABLE_REF already does that?)
bidi-inhibit-bpa t:
# Overhead Command Shared Object Symbol
# ........ ............ ............................. ............................................
#
11.21% emacs emacs [.] composition_compute_stop_pos
6.11% emacs emacs [.] CHAR_TABLE_REF
5.65% emacs emacs [.] mark_object
4.17% emacs emacs [.] re_match_2_internal
2.85% emacs emacs [.] lookup_char_property
1.82% emacs emacs [.] next_interval
1.74% emacs emacs [.] Fassq
1.65% emacs emacs [.] compute_stop_pos
1.63% emacs emacs [.] find_interval
1.19% emacs libc-2.29.so [.] _IO_getc
1.15% emacs libc-2.29.so [.] __memmove_avx_unaligned_erms
1.12% emacs emacs [.] exec_byte_code
1.02% emacs emacs [.] move_it_in_display_line_to
1.02% emacs emacs [.] sub_char_table_ref
0.92% emacs ld-2.29.so [.] do_lookup_x
0.90% emacs emacs [.] buf_bytepos_to_charpos
bidi-inhibit-bpa nil:
# Overhead Command Shared Object Symbol
# ........ ............ ............................. ..........................................................
#
96.59% emacs libc-2.29.so [.] __memmove_avx_unaligned_erms
0.22% emacs emacs [.] mark_object
0.17% emacs emacs [.] composition_compute_stop_pos
0.12% emacs emacs [.] re_match_2_internal
0.12% emacs emacs [.] bidi_resolve_explicit
0.09% emacs emacs [.] CHAR_TABLE_REF
0.07% emacs emacs [.] lookup_char_property
0.06% emacs emacs [.] bidi_fetch_char
0.05% emacs emacs [.] find_interval
0.05% emacs libc-2.29.so [.] _IO_getc
0.04% emacs emacs [.] move_it_in_display_line_to
0.04% emacs emacs [.] bidi_cache_search.constprop.0
0.04% emacs emacs [.] exec_byte_code
0.04% emacs emacs [.] next_interval
0.04% emacs emacs [.] mark_char_table
0.04% emacs emacs [.] pdumper_marked_p_implq
0.04% emacs ld-2.29.so [.] do_lookup_x
0.03% emacs libc-2.29.so [.] __strchr_avx2
0.03% emacs emacs [.] rpl_re_search_2
0.03% emacs emacs [.] sub_char_table_ref
0.03% emacs emacs [.] bidi_cache_iterator_state
[-- Attachment #2: bidi-inhibit-bpa t --]
[-- Type: application/octet-stream, Size: 15335 bytes --]
[-- Attachment #3: bidi-inhibiit-bpa nil --]
[-- Type: application/octet-stream, Size: 14727 bytes --]
next prev parent reply other threads:[~2019-12-02 10:27 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-27 21:52 bug#38407: 27.0.50; infinite loop with display of large file without newlines Pieter van Oostrum
2019-11-27 23:38 ` Phil Sainty
2019-11-28 0:30 ` Phil Sainty
2019-11-28 1:22 ` Phil Sainty
2019-11-28 6:51 ` Pieter van Oostrum
2019-11-28 15:14 ` Eli Zaretskii
2019-11-28 18:30 ` Pieter van Oostrum
2019-11-28 18:53 ` Eli Zaretskii
2019-11-28 22:09 ` Pieter van Oostrum
2019-11-29 7:12 ` Eli Zaretskii
2019-11-29 11:48 ` Phil Sainty
2019-11-29 13:20 ` Eli Zaretskii
2019-11-29 13:48 ` Dmitry Gutov
2019-11-29 14:26 ` Eli Zaretskii
2019-11-29 14:31 ` Dmitry Gutov
2019-11-29 15:03 ` Eli Zaretskii
2019-11-29 16:53 ` Dmitry Gutov
2019-11-29 19:28 ` Eli Zaretskii
2019-11-29 17:24 ` Pieter van Oostrum
2019-11-29 19:30 ` Eli Zaretskii
2019-11-30 8:25 ` Pieter van Oostrum
2019-12-01 7:23 ` Pieter van Oostrum
2019-12-01 10:37 ` Phil Sainty
2019-12-01 16:35 ` Pieter van Oostrum
2019-12-01 18:40 ` Pieter van Oostrum
2019-12-02 16:23 ` Eli Zaretskii
2019-12-01 17:45 ` Eli Zaretskii
2019-12-02 10:27 ` Robert Pluim [this message]
2019-12-03 11:20 ` Robert Pluim
2019-12-03 16:05 ` Eli Zaretskii
2019-12-04 9:15 ` Robert Pluim
2019-12-04 15:45 ` Eli Zaretskii
2019-12-05 7:27 ` Robert Pluim
2019-12-05 15:01 ` Eli Zaretskii
2019-12-05 20:38 ` Phil Sainty
2019-12-06 8:04 ` Eli Zaretskii
2019-12-07 1:28 ` Phil Sainty
2019-12-07 7:56 ` Eli Zaretskii
2019-11-28 15:06 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2immzt43l.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=38407@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=pieter@vanoostrum.org \
--cc=psainty@orcon.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).