Cl=C3=
=A9ment Pit-Claudel <
cpitclaude=
l@gmail.com> schrieb am Sa., 8. Apr. 2017 um 17:15=C2=A0Uhr:
On 2017-04-08 11:03, Philipp Stephani wrot=
e:
> Cl=C3=A9ment Pit-Claudel <cpitclaudel@gmail.com schrieb:
>> =E2=80=A6 essentially everything in packages that were previously<=
br class=3D"gmail_msg">
>> preloaded needs to be autoloaded now, since many packages don'=
t
>> (require) the preloaded features that they use.
> Doesn't that effectively just move most of the code to loaddefs.el=
,
> from which it again has to be either preloaded or byte-compiled into
> the "big .elc file"? Does this really bring measurable benef=
its
> nowadays?
(Sorry if I'm misunderstanding you)
I think the idea is that you can defer loading the implementation of a sign=
ificant fraction of currently-preloaded functions, because many of these ar=
e currently unused.
So the intended saving is that currently-preloaded but uncommonly-used func=
tions would not be dumped to the big-elc (their signatures, in the form an =
autoload, would be).=C2=A0 Packages that use them without (require)-ing the=
corresponding feature first would still work, but startup would be faster.=
The question is wh=
ether there is actually a significant speed-up.
Autoloading is tr=
aditionally used for a small number of interactive commands that cause larg=
e optional libraries to be loaded. In such cases I could imagine that the p=
erformance gain is still significant. However, you now suggest that preload=
ed libraries get turned into autoloads. The structure of those libraries is=
typically quite different: the consist to a large extent of individual hel=
per functions that are independent of each other. My guess is that this cou=
ld make overall performance worse: it will cause loaddefs.el to contain all=
the signatures and docstrings of these helper functions, and loaddefs.el i=
s itself not byte-compiled. Therefore, you now need to load the definitions=
effectively twice: once in loaddefs.el, once the functions are actually us=
ed. Therefore such a change shouldn't be made without measuring its imp=
act.
I'd actually prefer going into the other direction: prel=
oad much more than now, and remove lots of stuff from autoloads. This will =
probably need a different strategy for preloading (Daniel's approach, o=
r Rmacs, or an Elisp LLVM compiler, ...).