GNU bug report logs - #19390
25.0.50; `package-activate' is too slow

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Mon, 15 Dec 2014 17:36:01 UTC

Severity: normal

Found in version 25.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #145 received at 19390 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Artur Malabarba <bruce.connor.am <at> gmail.com>
Cc: 19390 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#19390: 25.0.50; `package-activate' is too slow
Date: Thu, 18 Dec 2014 23:31:30 -0500
> `require' is only ever called as part of loading package (or doing
> some other processing).

There are a few places where we `require' inside a function that can be
called repeatedly, on the assumption that in most cases, this `require'
will be "instantaneous".  I'd rather not re-consider this
performance choice.

I'm OK with slowing down require like you suggested (that was actually
my original suggestion to handle the byte-compilation breakage during
package upgrade), but then we'd only want to do it in some specific
contexts (during byte-compilation) rather than all the time.

> When `autoload' is called, if the function in question is completely
> defined (instead of not defined or just autoloaded), `autoload' will
> check if the file it was given is a different file from the one the
> function was defined in (when we know that file).
> If it is then all is fine, if it wasn't then it loads the new file.

So we first add handling for `require', then another for `autoload',
... in the end I can't believe it can be simpler than what we have
(which has 0 cost in normal use, and a very small extra cost during
package upgrade).


        Stefan




This bug report was last modified 10 years and 236 days ago.

Previous Next


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