Re: [Cppcms-users] memory footprint for hiding boost
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-09-14 07:16:57
|
First of all cppcms_boost is used in very limited way in header only: CppCMS 1.0.2 - boost::bind - boost::format - boost::interprosess (memory segment) - boost::unordered - boost::iostreams (the only small not header only part - gzip compression) - boost::variant - boost::crc in CppCMS trunk - boost::bind - boost::crc Rest - format - removed (shouldn't be in first place) - iterpresses improved with better memory allocation alg. - unordered replaced with stable hash table (where rehash does not invalidate iterators) - iostreams - gzip - custom std::streambuf - much more lightweight implementation - variant - replaced as well ------------------ Now even if you replace cppcms_boost with boost you will not get any advantage as 90% of stuff is header only specialized for specific object and the rest can be removed with options ---------- Now if you want to reduce executable size use options: http://cppcms.com/wikipp/en/page/cppcms_1x_build#Build.Options 1. In embedded platform you most likely do not need tcp_cache, you don't need prefork_cache(if you don't use prefork mode) or cache at all of you don't use caching 2. If you don't use AES encypted cookies - remove OpenSSL and Gcrypt support. 3. Remove localization backeds you don't need (you have 3 icu, std, posix you need one of them - icu most powerful but BIGGEST and depends on ICU library which is big) 4. If you use Embedded HTTP server you may remove SCGI and FASTCGI support 5. Use MinSizeRel option - to make smallest code 6. You may also remove gzip support (you'll get rid of gzip library as well) but the output will not be compressed - but for embedded platform it is not really a drawback. This is the best way to reduce executable size - and the most efficient one. Replacing cppcms_boost with boost is neither supported and will have negligible effect. And if there are still some CPPCMS_USE_EXTERNAL_BOOST macros... they should be removed :-) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Markus Raab <us...@ma...> >To: cpp...@li... >Sent: Friday, September 14, 2012 9:03 AM >Subject: [Cppcms-users] memory footprint for hiding boost > >Hello group! > >Did someone try to measure how much more memory is used when an application >using cppcms also uses boost compared to if it would use the same >cppcms_boost? > >I was wondering how much (memory) overhead this is for an embedded platform? >(I assume a linker will not load symbols twice, even if the symbol is weak) > >If the overhead is noticeable, is it planned that boost or cppcms_boost >could be used from another location so that it can be shared with the >application (not needing ABI compatibility because it is rebuild in the >toolchain everytime anyway)? > >There seem to be some #ifdef CPPCMS_USE_EXTERNAL_BOOST sometimes? > >Is it correct that the cppcms_boost is header-only? > >best regards >Markus > > >------------------------------------------------------------------------------ >Got visibility? >Most devs has no idea what their production app looks like. >Find out how fast your code is with AppDynamics Lite. >http://ad.doubleclick.net/clk;262219671;13503038;y? >http://info.appdynamics.com/FreeJavaPerformanceDownload.html >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |