Message365527
I've tweaked the pcbuild options for pyshellext to reduce the size of the binary.
Since this is a very simple component, there really isn't much benefit of
optimizing for speed, likely the slowest part of this component's lifetime is
simply loading it.
This patch turns on Whole Program Optimization, MinSpace optimization, /Ob2
AnySuitable function inlining (to expose more code to elimination, this does
actually help here), /Zo (so that people can still debug it when lots of code
has been optimized out), turns of C++ RTTI (nobody is using it), /OPT:REF dead
code elimination, /OPT:ICF COMDAT folding, Link Time Code Generation, and
DebugFull debugging information creation.
/Gw global data optimization seemed to do nothing, which makes sense since
there isn't much going on in this project, very little in the way of actual
global data. Disabling C++ exceptions both in the project config (i.e. /EH-),
and disabling stdlib exceptions via _HAS_EXCEPTIONS=0, had no effect.
Strangely, with exceptions disabled and _HAS_EXCEPTIONS=0, exception functions
are still emitted in the binary (as seen in IDA). I presume it has something
to do with the fact that its a dll.
Enabling optimizations (even for Debug builds) should have no effect. The debug
builds were not actually using debugging featuers (not even assert), so nothing
should change.
pyshellext.dll 32 bit unimproved release size: 42KB
pyshellext.dll 32 bit improved release size: 25KB
size reduction: -17KB
% size reduction: 40%
pyshellext_d.dll 32 bit unimproved debug size: 85KB
pyshellext_d.dll 32 bit improved debug size: 32KB
size reduction: -53KB
% size reduction: 62%
pyshellext.dll 64 bit unimproved release size: 52KB
pyshellext.dll 64 bit improved release size: 30KB
size reduction: -22KB
% size reduction: 42%
pyshellext_d.dll 64 bit unimproved debug size: 105KB
pyshellext_d.dll 64 bit improved debug size: 38KB
size reduction: -67KB
% size reduction: 63% |
|
Date |
User |
Action |
Args |
2020-04-01 22:43:57 | Alexander Riccio | set | recipients:
+ Alexander Riccio, paul.moore, tim.golden, zach.ware, steve.dower |
2020-04-01 22:43:57 | Alexander Riccio | set | messageid: <1585781037.54.0.0844996141167.issue40145@roundup.psfhosted.org> |
2020-04-01 22:43:57 | Alexander Riccio | link | issue40145 messages |
2020-04-01 22:43:57 | Alexander Riccio | create | |
|