Subject: bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode

From: Stefan Monnier <[email-masked]>
Date: Thu, 17 Jan 2019 18:25:55 -0500

>> From: Fernando Jascovich <[email-masked]>
>> Date: Tue, 08 Jan 2019 19:11:02 -0300
>> 
>> Hi everyone, this is my first email to bug-gnu-emacs, so please let me
>> know if I am making some mistake.
>> For no special reason, I took this bug in order to start to know  emacs'
>> code.
>> Following and confirming the details of the bug, I found that indeed the
>> performance issue is introduced at commit 0055190174, but not beacuse
>> the introduction of `sgml-syntax-propertize-inside`.
>> The problem is with the last rule:
>> ```
>> ("\"" (0 (if (prog1 (zerop (car (syntax-ppss (match-beginning 0))))
>>                     (goto-char (match-end 0)))
>>                   (string-to-syntax ".")))
>> ```
>> I can't see the real effect of this rule, I tested xml parsing without
>> this rule and it works fine, marking double quotes inside tags as
>> expected without this performance issue.
>> Do we need to target double quotes outside tags explicitly?
>
> Stefan, any comments?

Yes, he's exactly right.

I just pushed a patch to master which should reduce significantly
this delay.

        Stefan