From: "Mattias Engdegård" <mattiase@bredband.net>
To: 13369@debbugs.gnu.org
Subject: bug#13369: 24.1; compile message parsing slow because of omake hack
Date: Sun, 6 Jan 2013 21:03:05 +0100 [thread overview]
Message-ID: <672E6DB1-196D-491C-BE42-F29CF1C7F1A5@bredband.net> (raw)
Parsing compilation messages in compilation-mode can be very slow for
large buffers (thousands of error lines); it can take many
seconds. Experiments show that it is the presence of omake in
compilation-error-regexp-alist that causes most of the trouble; removing
it mostly cures the problem.
The omake regexp does not look too troublesome, but there are some
omake-specific hacks in compile.el that are more worrying. In
particular, this code (in compilation-parse-errors) looks suspicious:
(cond
((not (memq 'omake compilation-error-regexp-alist)) nil)
((string-match "\\`\\([^^]\\|^\\( \\*\\|\\[\\)\\)" pat)
nil) ;; Not anchored or anchored but already allows empty
spaces.
(t (setq pat (concat "^ *" (substring pat 1)))))
The slightly alarming concept of regexp-matching a regexp aside, this
one doesn't make sense - shouldn't the ^ (following the \|) be escaped?
Apparently the code was at some time changed from
(when (and (= ?^ (aref pat 0)) ; anchored: starts with "^"
;; but does not allow an arbitrary number of leading
spaces
(not (and (= ? (aref pat 1)) (= ?* (aref pat 2)))))
which looks more correct, and conveys the intent somewhat better
(and may be more efficient than the regexp for all I know).
It's not clear to me how the present code could ever have worked.
At the very least the regexp in compilation-parse-errors should
be fixed.
In GNU Emacs 24.1.1 (powerpc-apple-darwin, NS apple-appkit-1038.36)
of 2012-06-10 on bob.porkrind.org
Windowing system distributor `Apple', version 10.3.949
next reply other threads:[~2013-01-06 20:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-06 20:03 Mattias Engdegård [this message]
2013-01-07 1:24 ` bug#13369: 24.1; compile message parsing slow because of omake hack Glenn Morris
2013-01-07 1:41 ` Mattias Engdegård
2013-01-07 8:14 ` Glenn Morris
2013-01-07 21:50 ` Mattias Engdegård
2013-01-08 20:14 ` Glenn Morris
2013-01-08 21:09 ` Mattias Engdegård
2013-01-08 22:40 ` Glenn Morris
2013-01-09 1:47 ` Stefan Monnier
2013-01-09 11:11 ` Mattias Engdegård
2013-01-09 13:42 ` Jambunathan K
2013-01-09 14:31 ` Mattias Engdegård
2013-01-09 15:17 ` Jambunathan K
2013-01-10 18:55 ` Mattias Engdegård
2013-01-10 19:34 ` Stefan Monnier
2013-01-09 20:20 ` Stefan Monnier
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=672E6DB1-196D-491C-BE42-F29CF1C7F1A5@bredband.net \
--to=mattiase@bredband.net \
--cc=13369@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 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.