[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7069: Compilation from within emacs becomes slower and slower until
From: |
Daniel Colascione |
Subject: |
bug#7069: Compilation from within emacs becomes slower and slower until Emacs is restarted |
Date: |
Sun, 24 Apr 2011 18:16:58 -0700 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 4/20/11 6:10 AM, Stefan Monnier wrote:
>> (add-hook 'compilation-mode-hook
>> (lambda () (setq compilation-error-regexp-alist
>> (cons
>> ;; Quartus II error messages
>> '(".*Verilog .* at \\(.+\\)(\\([0-9]+\\)): .*" 1 2)
>> compilation-error-regexp-alist))))
[snip]
>> I haven't looked further into why this should be a problem.
>
> I can't think of any reason why this regexp should make compilation
> become slower (I can see why it would make it slow, but unless lines
> become longer over time, it should keep the same slowness at the end as
> it had at the beginning).
He's adding an entry to compilation-error-regexp-alist every time he
compiles, and this variable is not buffer local. After the 20th
compilation, Emacs tries 20 times harder to match this regular expression.
He should be using add-to-list or (pushnew mumble :test #'equal).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
iEYEARECAAYFAk20y4YACgkQ17c2LVA10VsQ0wCg3bzMD1o0IRivJBy4re3yofcv
K/MAniiaVMysZW/7RGG1QS1E9RAIxNT5
=C03A
-----END PGP SIGNATURE-----