Subject: Re: [boost] Extremely large Visual Studio libboost_log_setup* binaries
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-07-14 12:36:45
On Thursday 04 July 2013 00:27:41 you wrote:
> One other part of boost_log_setup that takes space is the default
> filter/formatter factories that are instantiated for all fundamental types.
> These factories are invoked by the parsers to actually create the filters
> and formatters. Without them the user has to register every single
> attribute in the library (both filter and formatter factory), which would
> make it very inconvenient to use. Right now users only have to register
> their custom typed attributes.
> Anyway, this last part (default factories) I can make optional, and I think
> this will reduce binary size considerably. However, I don't think this can
> be done for 1.54. Regarding parsers though, I'm not sure there's anything I
> can do, but if I'd appreciate if any Boost.Spirit/Boost.Phoenix gurus would
> take a look at them and suggest how to tweak them.
I've made a commit that implements this in trunk. Disabling default factories
reduces the debug static lib size to 296 MiB:
663552 Jul 14 16:02 boost_log_setup-vc110-mt-1_55.dll
24566 Jul 14 16:02 boost_log_setup-vc110-mt-1_55.lib
2462208 Jul 14 16:02 boost_log_setup-vc110-mt-gd-1_55.dll
24742 Jul 14 16:02 boost_log_setup-vc110-mt-gd-1_55.lib
638464 Jul 14 16:02 boost_log-vc110-mt-1_55.dll
254468 Jul 14 16:02 boost_log-vc110-mt-1_55.lib
1656832 Jul 14 16:02 boost_log-vc110-mt-gd-1_55.dll
255704 Jul 14 16:02 boost_log-vc110-mt-gd-1_55.lib
112617054 Jul 14 16:01 libboost_log_setup-vc110-mt-1_55.lib
311247848 Jul 14 16:02 libboost_log_setup-vc110-mt-gd-1_55.lib
22629340 Jul 14 16:01 libboost_log-vc110-mt-1_55.lib
74343412 Jul 14 16:02 libboost_log-vc110-mt-gd-1_55.lib
Not much of an improvement, I guess.