Boost logo

Boost-Build :

Subject: Re: [Boost-build] Is there any way to prevent Boost.Build fromrecursively scanning header files for #include directives?
From: J. van der Wulp (jwulp_at_[hidden])
Date: 2009-04-29 07:15:12

I did not have a look at any of the scanning internals. From a naive
look at some level 3 debug logs I got the impression that a lot of
scanning work is being done more than once.

Is it possible to improve performance by caching scan results? It seems
as though a lot of header files are scanned repeatedly. Or is this a
consequence differences of preprocessor contexts that are taken into
account by the scanner?

The Big Question: do bjam/Boost Build v2 developers think that there is
room for performance improvement in this regard? Does any substantial
performance improvement in scanning come at the expense of correctness?

Johan Nilsson wrote:
> Thorsten Ottosen wrote:
>> Johan Nilsson skrev:
>>> Lin Luo wrote:
>>> Regarding speed improvements: For a specific project I went from 42s
>>> to 28s for a null build (no updates) from root when using
>>> "--fastbuild" (after warming up the disk cache before each attempt).
>>> The actual improvement obviously depends on how many skipped/static
>>> headers you actually use, so YMMV.
>> So it does seem like there is some speedup to gain.
> Yes, even though one must trade correctness for speed.
> For my personal use though, I generally only perform very local edits +
> compilation + tests in short cycles, and I _know_ that e.g. the standard
> headers or the boost headers won't change in between those - so why
> always check them? When I'm happy with a set of changes I submit the
> code to version control, where the changes are picked up by our CI
> server which runs the build with full dependency checking.
> There's of course the not-so-slight-chance that the jam module I posted
> isn't entirely correct, but I've been running some tests for it using
> the Boost.Build test system and have used it for a while without
> noticing any specific problems.
>> I think it takes quite a while before bjam actually calls the compiler
>> on my platform. It would be great if it could be improved.
> I hope so. Another possible extension/addition to this scanner would be
> to _only_ check dependencies for certain headers as an alternative
> option to excluding certain headers. Perhaps something like this:
>> bjam --fastbuild --extcscan-checkonly ^boost/assign/
> / Johan
> _______________________________________________
> Unsubscribe & other changes:

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at