GNU bug report logs - #70108
29.1.90; `defalias' and `current-load-list'

Previous Next

Package: emacs;

Reported by: Mickey Petersen <mickey <at> masteringemacs.org>

Date: Sun, 31 Mar 2024 15:40:02 UTC

Severity: minor

Found in version 29.1.90

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mickey Petersen <mickey <at> masteringemacs.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 70108 <at> debbugs.gnu.org
Subject: bug#70108: 29.1.90; `defalias' and `current-load-list'
Date: Sun, 31 Mar 2024 18:46:06 +0300
> From: Mickey Petersen <mickey <at> masteringemacs.org>
> Date: Sun, 31 Mar 2024 16:34:37 +0100
> 
> Here's a curious one. This is not so much a bug, I think, as a gotcha
> and perhaps something that I wouldn't mind understanding a bit better.
> 
> My package creates a number of dynamic commands (think:
> tempo/skeletons) to expand text.
> 
> It does so using the common (defalias NAME (lambda () ...)) pattern.
> 
> This obviously goes into the C core where a bunch of stuff takes
> place. One of variables that gets updated (somehow) is
> `current-load-list'. Curiously, it ends up with duplicate entries. I'm
> presuming there is a good reason for this.
> 
> This variable can easily get overrun with identical entries if the
> inattentive programmer does not check if it is already bound.
> 
> Due to a screwup on my part, I did not `fboundp' check first, which had the
> odd effect of causing incredible slowdowns when I ran my 600+ ERT test
> suite.
> 
> I have not narrowed down exactly *why* my ERT suite, when beset by 600
> tests to run in one go, causes the slowdown. What I'm guessing from
> how each successive tests slows down, that there is some sort of
> non-linear searching going on here, and either `load' (and friends) or
> the mere fact that putting more defaliases into the system causes this
> slowdown to occur.

Adding Stefan.




This bug report was last modified 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.