all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 19390@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>
Subject: bug#19390: 25.0.50; `package-activate' is too slow
Date: Thu, 18 Dec 2014 17:13:31 -0200	[thread overview]
Message-ID: <CAAdUY-JSRij9VisS-rj5LSKSDHVmdUnbLYiob1rvX68w+86krQ@mail.gmail.com> (raw)
In-Reply-To: <jwvfvccolas.fsf-monnier+emacsbugs@gnu.org>

2014-12-18 16:40 GMT-02:00 Stefan Monnier <monnier@iro.umontreal.ca>:
>>> I don't think this performance hit will be noticeable during regular
>>> package loading.
>> It'll probably slow down Emacs startup: `require' will have to call
>> `find-library-name' for each common feature that someone depends on, each
>> time a dependant is loaded.
>
> And more importantly, we suffer the slow down when require is supposed to
> be fast (i.e. when the package has already been loaded), so the relative
> speed impact is not negligible.

Again, is this slow down really that much?
It is a single call to `find-library'.

Yes, it is slow compared to the current speed of `require'ing an
already loaded package, but is it slow in perspective with what else
is being done?
`require' is only ever called as part of loading package (or doing
some other processing). Is a single call to `find-library' really that
slow compared to the rest of the package that will be loaded (or
byte-compiled) after this require?

>
> And doing it in `require' doesn't catch all cases, because it's done too
> lazily and doesn't account for packages loaded via autoloads.  Doing the
> reloads eagerly when a package is (re)activated is the better choice.

Yes, that's why I said we'd need to do something with `autoload's. Why
do you think that's too high level?

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.





  reply	other threads:[~2014-12-18 19:13 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15 17:34 bug#19390: 25.0.50; `package-activate' is too slow Dmitry Gutov
     [not found] ` <handler.19390.B.14186649209005.ack@debbugs.gnu.org>
2014-12-16  0:41   ` bug#19390: Acknowledgement (25.0.50; `package-activate' is too slow) Dmitry Gutov
2014-12-16 12:32 ` bug#19390: 25.0.50; `package-activate' is too slow Dmitry Gutov
2014-12-16 13:26   ` Artur Malabarba
2014-12-16 13:42     ` Artur Malabarba
2014-12-16 14:31       ` Dmitry Gutov
2014-12-16 21:35         ` Artur Malabarba
2014-12-16 23:16           ` Stefan Monnier
2014-12-16 23:27             ` Dmitry Gutov
2014-12-16 23:55               ` Stefan Monnier
2014-12-17  0:40                 ` Artur Malabarba
2014-12-17  1:17                   ` Dmitry Gutov
2014-12-17 14:33                     ` Artur Malabarba
2014-12-17  2:41                   ` Dmitry Gutov
2014-12-17 10:47                     ` Artur Malabarba
2014-12-18  0:14                       ` Dmitry Gutov
2014-12-18  1:38                         ` Stefan Monnier
2014-12-18  2:11                           ` Artur Malabarba
2014-12-18 10:37                             ` Dmitry Gutov
2014-12-18 14:30                               ` Stefan Monnier
2014-12-18 14:47                                 ` Dmitry Gutov
2014-12-18 15:39                                   ` Artur Malabarba
2014-12-18 15:47                                     ` Artur Malabarba
2014-12-18 16:15                                       ` Dmitry Gutov
2014-12-18 17:50                                         ` Artur Malabarba
2014-12-18 17:54                                           ` Dmitry Gutov
2014-12-18 18:40                                             ` Stefan Monnier
2014-12-18 19:13                                               ` Artur Malabarba [this message]
2014-12-19  4:31                                                 ` Stefan Monnier
2014-12-19 12:08                                                   ` Artur Malabarba
2014-12-18 18:37                                       ` Stefan Monnier
2014-12-18 15:49                                     ` Dmitry Gutov
2014-12-18 16:45                                     ` Dmitry Gutov
2014-12-18 16:14                                   ` Artur Malabarba
2014-12-18 15:15                               ` Artur Malabarba
2014-12-18 15:45                                 ` Dmitry Gutov
2014-12-18 17:39                                   ` Artur Malabarba
2014-12-18 17:52                                     ` Dmitry Gutov
2014-12-18 19:01                                       ` Artur Malabarba
2014-12-18 19:49                                         ` Dmitry Gutov
2014-12-18 18:42                                   ` Stefan Monnier
2014-12-18 18:45                                     ` Dmitry Gutov
2014-12-16 16:53       ` Dmitry Gutov
2014-12-16 22:00         ` Artur Malabarba
2014-12-17  1:05           ` Dmitry Gutov
2014-12-16 23:19         ` Stefan Monnier
2014-12-16 23:40           ` Dmitry Gutov
2014-12-16 23:56             ` 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=CAAdUY-JSRij9VisS-rj5LSKSDHVmdUnbLYiob1rvX68w+86krQ@mail.gmail.com \
    --to=bruce.connor.am@gmail.com \
    --cc=19390@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=monnier@iro.umontreal.ca \
    /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.