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: Phillip Lord
Subject: Re: Bloat in the Emacs Windows package
Date: Mon, 22 Apr 2019 21:40:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> 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.

>From what you are saying, emacs.exe and emacs-26.2.exe *will be* hard
links before they are zipped, but not after.


>> 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.

I am currently not treating snapshots and release builds differently at
all. When I took over the windows builds, there were no snapshots to my
knowledge. It's possible that is why I put debug symbols in and meant to
take them out but didn't.

> 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.

Indeed. Perhaps, here-in, lies the solution.

I currently have snapshots for master only. I could produce these for
both master and release branch and build these with debug info; while
tagged releases would get them without.

The risk here is that snapshots might get behind release builds, since
I'd consider the release to be more important than the snapshot when a
new tag is made.


>> 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.


At the moment, I specify -O2 specifically in my build. I guess this is
because if I specify any CFLAGS I need to give them all. Still, if this
is not windows specific I will wait till Emacs over all changes.


>>  - 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.

This I will do.

Phil



reply via email to

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