emacs-devel
[Top][All Lists]
Advanced

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

Re: Removal of unexec support from glibc malloc


From: Florian Weimer
Subject: Re: Removal of unexec support from glibc malloc
Date: Tue, 19 Jan 2016 08:03:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 01/19/2016 02:44 AM, Ken Raeburn wrote:
> 
>> On Jan 18, 2016, at 20:14, Dmitry Gutov <address@hidden> wrote:
>>
>> On 01/19/2016 01:45 AM, Ali Bahrami wrote:
>>
>>> Before you fight to to save unexec, I'd encourage you to measure the
>>> impact, and see if it still matters.
>>
>> As a rough measurement, 'src/emacs -Q' takes ~0.5s to launch on my machine. 
>> 'src/temacs -Q` takes ~5.5s.
>>
>> It seems not only machines have become faster, Emacs has grown quite a bit, 
>> too. :)
> 
> It’s also pretty aggressive about garbage collection after loading any code 
> before the unexec.  Presumably that’s to minimize the storage needed for the 
> shared on-disk image.
> 
> Try removing the after-load-functions hook in loadup.el that invokes GC, and 
> the explicit GC calls.  Also maybe bump up gc-cons-threshold by an order of 
> magnitude.  (Just until loading finishes, if you like.)

The attached patch brings down the temacs load time to under 0.5 seconds.

The major offender is find_string_data_in_pure in src/alloc.c, and
setting purify to nil gets rid of that.  Some additional savings come
from removing the after-load-function hook in loadup.el, as you
suggested, but they are comparatively minor.

For some reason, international/characters does not load anymore, so I
dropped it for quick testing.

Florian

Attachment: fast-temacs.patch
Description: Text Data


reply via email to

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