unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: 57245@debbugs.gnu.org
Subject: bug#57245: 29.0.50; M-> in a large XML file (without long lines) is slow
Date: Tue, 16 Aug 2022 17:33:58 +0300	[thread overview]
Message-ID: <18035574-1b50-62f4-7605-8cdb33204535@yandex.ru> (raw)

Branching this off from the discussion in bug#56682.

Prerequisite: Have an XML file that is 20 MB in size, and doesn't have
long lines.

Or follow steps 1-3 to create one.

1. wget -o large-file.xml 
https://updates.drupal.org/release-history/drupal/current
2. M-% /> RET ^J/> RET (to break up the long line into smaller pieces)
3. Select the contents of the file and copy them over and over for 99
times. Alternatively, copy them 9 times, then select the result, and
copy it 9 times as well. Save the buffer.

(To try to keep XML valid -- not sure if necessary -- you can only
perform the copying operation on the contents of the <releases> tag. But
that's probably not important. I did that, though.)

4. Kill the buffer and re-visit it again. Press M->.
5. Note the delay.

Here's the profiler output:

         1397  95% - command-execute
         1397  95%  - call-interactively
         1338  91%   - funcall-interactively
         1331  90%    - end-of-buffer
         1327  90%     - recenter
         1327  90%      - jit-lock-function
         1327  90%       - jit-lock-fontify-now
         1327  90%        - jit-lock--run-functions
         1327  90%         - run-hook-wrapped
         1327  90%          - #<compiled -0x14ecf3ff276f01c3>
         1327  90%           - font-lock-fontify-region
         1327  90%            - font-lock-default-fontify-region
         1327  90%             - nxml-extend-region
          845  57%              - skip-syntax-forward
          845  57%               - internal--syntax-propertize
          845  57%                - syntax-propertize
          845  57%                 - nxml-syntax-propertize
          845  57%                  - sgml-syntax-propertize
          842  57%                   - #<compiled 0x1894bdc3ad4ca90>
          479  32%                      sgml--syntax-propertize-ppss
            3   0%                     syntax-ppss
          482  32%              - nxml-move-outside-backwards
          482  32%               - nxml-inside-start
          482  32%                  syntax-ppss
            7   0%    + execute-extended-command
           59   4%   + byte-code
           59   4% + ...
           10   0% + timer-event-handler


In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 
3.24.20, cairo version 1.16.0)
  of 2022-08-16 built on potemkin
Repository revision: 81ff64d3ca8d6e43e976f209399d2a0e9b4a7dd8
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Ubuntu 20.04.4 LTS





             reply	other threads:[~2022-08-16 14:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16 14:33 Dmitry Gutov [this message]
2022-08-16 16:54 ` bug#57245: 29.0.50; M-> in a large XML file (without long lines) is slow Eli Zaretskii
2022-08-16 18:40   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-16 18:59     ` Eli Zaretskii
2022-08-16 19:32   ` Dmitry Gutov
2022-08-16 20:22     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-16 20:49       ` Dmitry Gutov
2022-08-16 21:45         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-16 22:20           ` Dmitry Gutov
2022-08-17 11:36             ` Eli Zaretskii
2022-08-17 11:46               ` Dmitry Gutov
2022-08-17 12:16                 ` Eli Zaretskii
2022-08-17 12:30                   ` Dmitry Gutov
2022-08-17 12:33                     ` Eli Zaretskii
2022-08-17 12:46                       ` Dmitry Gutov
2022-08-17 11:24     ` Eli Zaretskii
2022-08-17 12:14       ` Dmitry Gutov
2022-08-17 12:20         ` Eli Zaretskii
2022-08-17 12:40           ` Dmitry Gutov
2022-08-17 13:20       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=18035574-1b50-62f4-7605-8cdb33204535@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=57245@debbugs.gnu.org \
    /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).