unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Is compiling autoloads useful?
@ 2011-12-09 10:15 Roland Winkler
  2011-12-09 14:12 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Roland Winkler @ 2011-12-09 10:15 UTC (permalink / raw)
  To: emacs-devel

The Makefile used by the rather old BBDB v2 compiles the file
with BBDB autoloads. Does such a step offer any advantage with a
recent version of GNU Emacs?

Thanks,

Roland



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Is compiling autoloads useful?
  2011-12-09 10:15 Is compiling autoloads useful? Roland Winkler
@ 2011-12-09 14:12 ` Stefan Monnier
  2011-12-09 15:06   ` Lluís
  2011-12-09 15:11   ` Roland Winkler
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2011-12-09 14:12 UTC (permalink / raw)
  To: Roland Winkler; +Cc: emacs-devel

> The Makefile used by the rather old BBDB v2 compiles the file
> with BBDB autoloads.  Does such a step offer any advantage with a
> recent version of GNU Emacs?

It all depends on what gets put in there.  But if you only get calls to
`autoload' and a few calls to `add-to-list', byte-compilation should not
make any difference to the speed of the code.

Some people have reported that byte-compiling their .emacs makes
a measurable difference to their Emacs's startup time, tho, so there
might some advantage, but I must say I don't know where it comes from
(it must be linked to the way the file is loaded rather than to the
actual evaluation; maybe some decoding overhead or something like that).


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Is compiling autoloads useful?
  2011-12-09 14:12 ` Stefan Monnier
@ 2011-12-09 15:06   ` Lluís
  2011-12-09 15:11   ` Roland Winkler
  1 sibling, 0 replies; 6+ messages in thread
From: Lluís @ 2011-12-09 15:06 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Roland Winkler, emacs-devel

Stefan Monnier writes:

> Some people have reported that byte-compiling their .emacs makes
> a measurable difference to their Emacs's startup time, tho, so there
> might some advantage, but I must say I don't know where it comes from
> (it must be linked to the way the file is loaded rather than to the
> actual evaluation; maybe some decoding overhead or something like that).

Well, I'd say that's because people's .emacs tend to be more complex than an
autoload file :)


apa!

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Is compiling autoloads useful?
  2011-12-09 14:12 ` Stefan Monnier
  2011-12-09 15:06   ` Lluís
@ 2011-12-09 15:11   ` Roland Winkler
  2011-12-09 15:22     ` Andreas Schwab
  1 sibling, 1 reply; 6+ messages in thread
From: Roland Winkler @ 2011-12-09 15:11 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On Fri Dec 9 2011 Stefan Monnier wrote:
> > The Makefile used by the rather old BBDB v2 compiles the file
> > with BBDB autoloads.  Does such a step offer any advantage with a
> > recent version of GNU Emacs?
> 
> It all depends on what gets put in there.  But if you only get calls to
> `autoload' and a few calls to `add-to-list', byte-compilation should not
> make any difference to the speed of the code.

Thanks!

The file bbdb-autoloads.el is much like the various *loaddefs.el in
the lisp directory (which are not compiled either). It contains
a bunch of autoloads only, except for the lines

(provide 'bbdb-autoloads)
(if (and load-file-name (file-name-directory load-file-name))
    (add-to-list 'load-path (file-name-directory load-file-name)))

> Some people have reported that byte-compiling their .emacs makes a
> measurable difference to their Emacs's startup time, tho, so there
> might some advantage, but I must say I don't know where it comes
> from

I'll try to see whether I can get any measureable difference. Yet I
assume if compiling it made a noticable difference, then compiling the
much bigger standard lisp/loaddefs.el should speed up startup yet
more.

Roland



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Is compiling autoloads useful?
  2011-12-09 15:11   ` Roland Winkler
@ 2011-12-09 15:22     ` Andreas Schwab
  2011-12-09 15:38       ` Roland Winkler
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2011-12-09 15:22 UTC (permalink / raw)
  To: Roland Winkler; +Cc: Stefan Monnier, emacs-devel

"Roland Winkler" <winkler@gnu.org> writes:

> I'll try to see whether I can get any measureable difference. Yet I
> assume if compiling it made a noticable difference, then compiling the
> much bigger standard lisp/loaddefs.el should speed up startup yet
> more.

loaddefs.el is preloaded, so it doesn't matter here.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Is compiling autoloads useful?
  2011-12-09 15:22     ` Andreas Schwab
@ 2011-12-09 15:38       ` Roland Winkler
  0 siblings, 0 replies; 6+ messages in thread
From: Roland Winkler @ 2011-12-09 15:38 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Stefan Monnier, emacs-devel

On Fri Dec 9 2011 Andreas Schwab wrote:
> loaddefs.el is preloaded, so it doesn't matter here.

Thanks. What about the other uncompiled files

mh-e/mh-loaddefs.el       
net/tramp-loaddefs.el     
calendar/cal-loaddefs.el  
calendar/hol-loaddefs.el  
calendar/diary-loaddefs.el
emacs-lisp/cl-loaddefs.el 
calc/calc-loaddefs.el     
cedet/semantic/loaddefs.el
cedet/ede/loaddefs.el     
cedet/srecode/loaddefs.el 

I assume they are loaded if a particular package such as mh-e is
loaded. So they match exactly the kind of situation I have in mind
with the file bbdb-autoloads.el (which maybe should be renamed
bbdb-loaddefs.el).

Roland



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-09 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-09 10:15 Is compiling autoloads useful? Roland Winkler
2011-12-09 14:12 ` Stefan Monnier
2011-12-09 15:06   ` Lluís
2011-12-09 15:11   ` Roland Winkler
2011-12-09 15:22     ` Andreas Schwab
2011-12-09 15:38       ` Roland Winkler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).