unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57245: 29.0.50; M-> in a large XML file (without long lines) is slow
@ 2022-08-16 14:33 Dmitry Gutov
  2022-08-16 16:54 ` Eli Zaretskii
  0 siblings, 1 reply; 20+ messages in thread
From: Dmitry Gutov @ 2022-08-16 14:33 UTC (permalink / raw)
  To: 57245

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





^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-08-17 13:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-16 14:33 bug#57245: 29.0.50; M-> in a large XML file (without long lines) is slow Dmitry Gutov
2022-08-16 16:54 ` 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

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).