emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading souce Elisp faster


From: Stefan Monnier
Subject: Re: Loading souce Elisp faster
Date: Mon, 25 Feb 2013 10:19:06 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>     It used to be the case that compiling one's .emacs was silly because it
>     provided no measurable speed difference.  But nowadays this is not true
>     any more: loading a source Elisp file is significantly slower because it
>     goes through load-with-code-conversion.
> Is the slowdown due to heuristically recognizing the encoding?

The fast path (used by elc) parses the data straight from the file,
whereas the slow path loads the file into a buffer (which includes any
decoding if needed) and only then passes the resulting byte-stream to
the parser.
The difference is definitely noticeable.

> Even changing the default might break things for users.

Indeed.  I think the breakage would be reasonably limited, so I'd be
willing to take this risk, but I'd rather avoid having to go to the end
of the file looking for a coding: cookie.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]