From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode Date: Thu, 27 Dec 2018 18:02:07 +0200 Message-ID: <83imzf6jr4.fsf@gnu.org> References: <87ftujuvkd.fsf@zira.vinc17.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1545926928 20653 195.159.176.226 (27 Dec 2018 16:08:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Dec 2018 16:08:48 +0000 (UTC) Cc: 33887@debbugs.gnu.org To: Vincent Lefevre , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 27 17:08:44 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcYDC-0005Ek-ND for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Dec 2018 17:08:42 +0100 Original-Received: from localhost ([127.0.0.1]:53807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcYFI-0002I3-Tz for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Dec 2018 11:10:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcYF2-0001xq-1b for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 11:10:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcY7i-00024G-3v for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 11:03:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55319) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gcY7i-00023m-02 for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 11:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gcY7h-00043F-Re for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 11:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Dec 2018 16:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33887 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33887-submit@debbugs.gnu.org id=B33887.154592655115534 (code B ref 33887); Thu, 27 Dec 2018 16:03:01 +0000 Original-Received: (at 33887) by debbugs.gnu.org; 27 Dec 2018 16:02:31 +0000 Original-Received: from localhost ([127.0.0.1]:39468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcY79-00042O-Dn for submit@debbugs.gnu.org; Thu, 27 Dec 2018 11:02:31 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcY73-000425-1h for 33887@debbugs.gnu.org; Thu, 27 Dec 2018 11:02:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcY6s-00017u-2X for 33887@debbugs.gnu.org; Thu, 27 Dec 2018 11:02:15 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcY6r-00017o-Va; Thu, 27 Dec 2018 11:02:10 -0500 Original-Received: from [176.228.60.248] (port=3563 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gcY6q-0003ML-7O; Thu, 27 Dec 2018 11:02:09 -0500 In-reply-to: <87ftujuvkd.fsf@zira.vinc17.org> (message from Vincent Lefevre on Thu, 27 Dec 2018 11:13:06 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153908 Archived-At: > From: Vincent Lefevre > Date: Thu, 27 Dec 2018 11:13:06 +0100 > > When I open a large XML file and immediately go to the end of the > file with ' >', Emacs hangs for several seconds. For instance, > on /usr/share/xml/iso-codes/iso_639-3.xml from iso-codes in Debian > (a 1-MB file), it takes 5 seconds. On a 4-MB personal XML file, it > takes 15 seconds. > > This is a regression: Emacs 25 did not hang at all. Confirmed, thanks. The profile (see below) blames syntax-ppss called by sgml-syntax-propertize, so I suspect commit 0055190, which added sgml-syntax-propertize-inside to sgml-syntax-propertize. CC'ing Stefan who made those changes. Here's the profile: - command-execute 532 77% - call-interactively 532 77% - funcall-interactively 522 75% - end-of-buffer 500 72% - recenter 496 71% - jit-lock-function 496 71% - jit-lock-fontify-now 496 71% - jit-lock--run-functions 496 71% - run-hook-wrapped 496 71% - # 496 71% - font-lock-fontify-region 496 71% - font-lock-default-fontify-region 496 71% - nxml-extend-region 496 71% - skip-syntax-forward 496 71% - internal--syntax-propertize 496 71% - syntax-propertize 496 71% - sgml-syntax-propertize 490 71% syntax-ppss 445 64% push-mark 1 0% - find-file 20 2% - find-file-noselect 20 2% - find-file-noselect-1 19 2% - after-find-file 17 2% - normal-mode 17 2% - set-auto-mode 17 2% - set-auto-mode-0 17 2% - xml-mode 17 2% - byte-code 14 2% - require 12 1% - byte-code 11 1% - require 10 1% - byte-code 9 1% - require 6 0% - byte-code 6 0% - cl-generic-define-method 4 0% - cl--generic-make-function 4 0% - cl--generic-make-next-function 4 0% - cl--generic-get-dispatcher 4 0% - byte-compile 3 0% byte-code 1 0% - # 1 0% byte-compile-top-level 1 0% - custom-declare-variable 1 0% - custom-initialize-reset 1 0% - eval 1 0% - funcall 1 0% - # 1 0% - executable-find 1 0% locate-file 1 0% file-truename 1 0% - rng-nxml-mode-init 2 0% - rng-validate-mode 2 0% - rng-auto-set-schema 2 0% - rng-locate-schema-file 2 0% - rng-locate-schema-file-using 2 0% - rng-get-parsed-schema-locating-file 2 0% - rng-parse-schema-locating-file 1 0% - rng-parse-validate-file 1 0% - nxml-parse-instance 1 0% nxml-parse-instance-1 1 0% - file-truename 1 0% - file-truename 1 0% - file-truename 1 0% file-truename 1 0% - insert-file-contents 1 0% xml-find-file-coding-system 1 0% - execute-extended-command 1 0% - sit-for 1 0% redisplay 1 0% - minibuffer-complete 1 0% - completion-in-region 1 0% - completion--in-region 1 0% - # 1 0% - apply 1 0% - # 1 0% - completion--in-region-1 1 0% - completion--do-completion 1 0% - completion-try-completion 1 0% - completion--nth-completion 1 0% - completion--some 1 0% - # 1 0% - completion-basic-try-completion 1 0% - try-completion 1 0% completion-file-name-table 1 0% - byte-code 10 1% - read-extended-command 9 1% - completing-read 9 1% - completing-read-default 9 1% read-from-minibuffer 9 1% - find-file-read-args 1 0% - read-file-name 1 0% - read-file-name-default 1 0% - completing-read 1 0% - completing-read-default 1 0% - read-from-minibuffer 1 0% - redisplay_internal (C function) 1 0% find-image 1 0% - ... 158 22% Automatic GC 156 22% - macroexp--all-forms 1 0% - macroexp--expand-all 1 0% - # 1 0% - macroexp--all-forms 1 0% - macroexp--expand-all 1 0% - macroexp--all-forms 1 0% - macroexp--expand-all 1 0% - # 1 0% - macroexp--all-forms 1 0% - macroexp--expand-all 1 0% - # 1 0% - macroexp--all-forms 1 0% - macroexp--expand-all 1 0% - macroexp-macroexpand 1 0% - macroexpand 1 0% # 1 0% - rng-compute-start-tag-open-deriv 1 0% - rng-element-get-child 1 0% - rng-compile 1 0% - apply 1 0% - rng-compile-group 1 0% - mapcar 1 0% - rng-compile 1 0% - apply 1 0% - rng-compile-attribute 1 0% - rng-compile 1 0% - apply 1 0% - rng-compile-ref 1 0% - rng-compile 1 0% - apply 1 0% - rng-compile-data 1 0% rng-compile-dt 1 0%