emacs-devel
[Top][All Lists]
Advanced

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

Re: Bloat in the Emacs Windows package


From: Eli Zaretskii
Subject: Re: Bloat in the Emacs Windows package
Date: Fri, 19 Apr 2019 09:29:30 +0300

> From: address@hidden (Phillip Lord)
> Cc: address@hidden,  address@hidden
> Date: Thu, 18 Apr 2019 22:19:26 +0100
> 
> >   objcopy --only-keep-debug emacs.exe emacs.debug
> >   strip -g emacs.exe
> >   objcopy --add-gnu-debuglink=emacs.debug emacs.exe
> >
> > When unpacked, the emacs.debug file should install into the bin/.debug
> > directory of the Emacs installation.
> 
> Would this impact on emacs-26.2.exe also or would I need to things like:
> 
> objcopy --only-keep-debug emacs.exe emacs.debug
> strip -g emacs.exe
> strip -g emacs-26.2.exe
> objcopy --add-gnu-debuglink=emacs.debug emacs.exe
> objcopy --add-gnu-debuglink=emacs.debug emacs-26.2.exe

There is no magic: if emacs.exe and emacs-26.2.exe are two separate
files (not hard links to the same file data), then yes, you will need
the additional commands above.  Sorry for not saying that explicitly.

> To summarise my feelings about the thread so far:
> 
>  - I think most normal users don't need debug symbols, so I would be
>    minded to remove them (or not put them). I don't know why I have
>    added "-g3" to the default options. People who know what to do with
>    debug symbols are likely to be able to build Emacs for
>    themselves.

Are we only talking about official releases, or do you include
development snapshots in the above reasoning?  Snapshots should
include the symbols IMO, to facilitate more efficient debugging of
problems reported for them.  The assumption is that people who install
snapshots are more cognizant about debugging and are less "normal"
than those who download official releases, in the sense that they
prefer efficient bug reports to disk space savings.

> Unanswered questions for me:
> 
>  - If we remove debug symbols, why not do -O3 which may produce some
>    performance benefit?

IME, -O3 is useless for Emacs, probably because the expensive inner
loops are very large.  It does produce a larger executable, which is
another downside.  It is also less well tested, since thedefault build
uses -O2.

That said, my metrics were done years ago, and it's possible that
nowadays -O3 performs better.  If we want to explore this, someone
should try building Emacs with -O3 and producing some measurements for
GCC versions 7 and up to 9.  And I don't think this is Windows
specific: if -O3 produces worthy benefits, we might consider using it
in production builds on all platforms.

>  - Is it better to do "-g0" which I believe stops adding debug symbols,
>    or switch "make install" for "make install-strip"?

I'd say the latter, because 'install-strip' is the official GNU way of
getting a stripped binary.

Thanks.



reply via email to

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