all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 57245@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#57245: 29.0.50; M-> in a large XML file (without long lines) is slow
Date: Wed, 17 Aug 2022 14:24:01 +0300	[thread overview]
Message-ID: <83fshvdsfi.fsf@gnu.org> (raw)
In-Reply-To: <913e0b46-7145-d39d-1fcd-bc17094e28f2@yandex.ru> (message from Dmitry Gutov on Tue, 16 Aug 2022 22:32:23 +0300)

> Date: Tue, 16 Aug 2022 22:32:23 +0300
> Cc: 57245@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> 
> On 16.08.2022 19:54, Eli Zaretskii wrote:
> > Stefan, can you see why syntax-related stuff in sgml-mode is so heavy
> > here?
> 
> nxml-syntax-propertize might well be heavier than average, but the delay 
> scales linearly with the size of the file.

Which is generally not a good scaling factor, especially if the
coefficient is quite large (as it seems to be in this case).

> Which seems to be exactly the behavior the "font-lock narrowing" was 
> supposed to guard from?

No.  It wasn't supposed to fix modes that foolishly scan the buffer
from BOB to point.  It was supposed to fix modes which scan from the
beginning of line, and that is (a) only a problem when lines are very
long, and (b) much harder to solve in the mode itself, because
font-lock very frequently uses anchored regexps and otherwise likes to
start from BOL, and syntax processing also likes starting from BOL.

Btw, does nXML and/or sgml-mode use libxml for their analysis?  If
not, why not? wouldn't that be faster (and possibly more accurate)?





  parent reply	other threads:[~2022-08-17 11:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83fshvdsfi.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=57245@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.