Opened 16 years ago
Last modified 13 years ago
#889 assigned Feature Requests (None)
Insane Dependencies
Reported by: | nobody | Owned by: | az_sw_dude |
---|---|---|---|
Milestone: | Component: | date_time | |
Version: | None | Severity: | Optimization |
Keywords: | Cc: |
Description (last modified by )
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. :)
Change History (5)
comment:2 by , 13 years ago
Severity: | → Optimization |
---|---|
Type: | Bugs → Feature Requests |
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.StringAlgo. It would be really great to move as much of this code to the compiled library as possible.
comment:4 by , 13 years ago
Description: | modified (diff) |
---|
Is this still a useful request? Here's what I got on my MacBookPro (junk is just 'main', junk2 includes "boost/date_time/posix_time/posix_time.hpp")
DuoTwo:~ marshall$ time g++ -I /Marshall/Sources/boost/trunk junk.cpp
real 0m0.056s user 0m0.025s sys 0m0.023s
DuoTwo:~ marshall$ time g++ -I /Marshall/Sources/boost/trunk junk2.cpp
real 0m1.641s user 0m1.395s sys 0m0.228s
comment:5 by , 13 years ago
I think, it is useful. Boost.DateTime is included from other libraries, such as Boost.Thread. Now it brings in quite a few other dependencies, such as Boost.StringAlgo and Boost.LexicalCast. I think, making Boost.DateTime headers as lightweight as possible is a good thing.
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.