Boost logo

Boost-Build :

Subject: [Boost-build] BBv2 Slow Startup
From: Adder (adder.thief_at_[hidden])
Date: 2008-11-04 02:31:00


Hi there,

Boost Build v2 is a wonderful system, but unfortunately it takes a
long time to start building stuff.

Here I am trying to compile Charles Petzold's "Analog Clock" 200-line
example program (which is shamelessly attached):

  - Running the compiler and the linker explicitly takes 328 ms.

  - Running bjam (with the attached Jamfile) takes 3969 ms,
    when there is no need to update anything ! That is: 4 seconds,
    without running the compiler and without running the linker.

On moderate projects, it takes 7 to 18 seconds to build 2 or 3
modified .cpp files, whereas building them from the IDE takes 1 to 2
seconds.

I've been able to reduce the build start-up time a little bit (30
seconds vs 60 seconds on cold-cache, 2 seconds vs 4 seconds on the
"Analog Clock" example, etc.) by modifying the Boost Jamroot as
follows:

  - "all-libraries" is manually assigned to:

      all-libraries =
        date_time filesystem function_types graph iostreams math mpi
        program_options python regex serialization signals
        system test thread wave ;

  - "headers" is manually assigned to:

      local headers = boost/config.hpp ;

I guess these modifications interfere with installing Boost headers;
however, they avoid globbing from the Jamroot.

However, it still takes very long before the compiler is run... !

My questions are:

(1) Are there any plans or possibilities to make the system faster ?
What about caching the header dependencies (and only checking
the timestamps) ? Or storing and loading precompiled Jamfiles (just as
compilers store and load precompiled headers) ? Is the language of
choice (used to implement BBv2) to blame for the (lack of) speed ?

(2) Process Monitor shows a lot of attempts to open files with invalid
pathnames (such as E:\...\!-Home\AnaClock\<module@>\version.jam).
Can't these be avoided ?

(3) The compilers I know (Borland, Visual, DMC, G++) allow the user to
specify multiple .cpp files in a single command:

  bcc32 -c Main.cpp Utilities.cpp Stuff.cpp

  is faster than

  bcc32 -c Main.cpp
  bcc32 -c Utilities.cpp
  bcc32 -c Stuff.cpp

Once the build start-up slowness is fixed, taking advantage of this
feature of the compilers might speed up the actual compilation.

(I know it's easy to "suggest" and "complain", as opposed to actually
trying to do something...)

The "BUILD.EXE" system used for building Windows DDK drivers has some
similar features (automatic header dependency checking, deducing
folder for output, even compiling multiple source files in a single
command) and its speed is very good (same as IDE).

Thank you,

-- 
Best regards,
 Adder





Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk