Boost C++ Libraries: Ticket #889: Insane Dependencies https://svn.boost.org/trac10/ticket/889 <pre class="wiki">From: helvey@accelrys.com Simply including boost/date_time/posix_time headers causes build times to skyrocket. Building a file that includes boost/date_time/posix_time/posix_time.hpp takes almost a minute, removing the header drops the time to less than a second. Also why no conversions to time_t? It would be nice not to have include the header outside of translation units. :) </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/889 Trac 1.4.3 az_sw_dude Tue, 10 Apr 2007 00:24:19 GMT <link>https://svn.boost.org/trac10/ticket/889#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/889#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=579686 Originator: NO Well, nothing even close on my Linux machine: time g++-4.0 -I /opt/devTools/boost_rc_1_34 test.cpp real 0m1.482s user 0m1.140s //test.cpp #include "boost/date_time/posix_time/posix_time.hpp" int main() { return 0; } ************** That said, I agree that header isn't particularly "light weight" -- it does include a large number of files. Some of this could be paired down by removing depedence on lexical_cast and shared_ptr in the core library. Neither of these are quick changes to make. As for time_t conversion, please submit that as an independent feature request, but be aware that there are many dates/times that will cause an exception on this conversion since there are many dates/time boost date-time can represent that time_t cannot. Thx, Jeff </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Thu, 04 Jun 2009 09:13:25 GMT</pubDate> <title>type changed; severity set https://svn.boost.org/trac10/ticket/889#comment:2 https://svn.boost.org/trac10/ticket/889#comment:2 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> <li><strong>severity</strong> → <span class="trac-field-new">Optimization</span> </li> </ul> <p> I suspect most of the compilation overhead is due to IO support code, which aside from streams uses quite a few heavy things, such as lexical_cast and Boost.<a class="missing wiki">StringAlgo</a>. It would be really great to move as much of this code to the compiled library as possible. </p> Ticket Andrey Semashev Thu, 04 Jun 2009 09:24:37 GMT <link>https://svn.boost.org/trac10/ticket/889#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/889#comment:3</guid> <description> <p> Request for conversions to time_t extracted to <a class="assigned ticket" href="https://svn.boost.org/trac10/ticket/3132" title="#3132: Feature Requests: Provide conversions to time_t (assigned)">#3132</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Sun, 22 Nov 2009 17:18:00 GMT</pubDate> <title>description changed https://svn.boost.org/trac10/ticket/889#comment:4 https://svn.boost.org/trac10/ticket/889#comment:4 <ul> <li><strong>description</strong> modified (<a href="/trac10/ticket/889?action=diff&amp;version=4">diff</a>) </li> </ul> <p> Is this still a useful request? Here's what I got on my <a class="missing wiki">MacBookPro</a> (junk is just 'main', junk2 includes "boost/date_time/posix_time/posix_time.hpp") </p> <p> DuoTwo:~ marshall$ time g++ -I <a class="missing wiki">/Marshall/Sources</a>/boost/trunk junk.cpp </p> <p> real 0m0.056s user 0m0.025s sys 0m0.023s </p> <p> DuoTwo:~ marshall$ time g++ -I <a class="missing wiki">/Marshall/Sources</a>/boost/trunk junk2.cpp </p> <p> real 0m1.641s user 0m1.395s sys 0m0.228s </p> Ticket Andrey Semashev Sun, 22 Nov 2009 20:03:13 GMT <link>https://svn.boost.org/trac10/ticket/889#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/889#comment:5</guid> <description> <p> I think, it is useful. Boost.<a class="missing wiki">DateTime</a> is included from other libraries, such as Boost.Thread. Now it brings in quite a few other dependencies, such as Boost.<a class="missing wiki">StringAlgo</a> and Boost.<a class="missing wiki">LexicalCast</a>. I think, making Boost.<a class="missing wiki">DateTime</a> headers as lightweight as possible is a good thing. </p> <p> One solution I have in mind is extracting as much IO code as possible into the compiled binary. However, I have other thoughts on optimizing IO that I wanted to implement during the extraction. But these tasks can be done independently. </p> </description> <category>Ticket</category> </item> </channel> </rss>