Sent directly to me:
> Hi Tony
> > I have a Qt 4.5.2 project with many forms and source files.
> During the
> > build 1,000 obj files are created, of which 400 are from
> moc files. On
> > mac the project builds and links in about 5 mins. On win
> VS 2005 it takes
> > over 15 mins.
> I think I have a similar sized project (1100 object files,
> only ~200 moc
> generated though) and I'm not seeing those kind of link
> times. Worst case is
> about 5 minutes total build time from clean including link
> with /GL option.
> Infact for my my project builds and links a lot slower on OSX
> (on the same
> 1.8ghz macbook, 7200rpm hitachi drive). That said, even a
> link does take a
> bit of time due to /GL.
> Do you have incremental linking enabled?
> Do you have whole program optimization switched on (/GL)?
> This is going to
> slow linking down a lot since the linker will
> recompile/optimize the code a
> link time -- short of switching this off I'm not sure how to
> get around
> this. I don't think having moc files included in other objs
> is going to
> resolve this.
Thanks Ross. Interesting comparison. In fact the clean and build debug
time is over 33 mins!
Incremental linking is switched on by default in Qt's VS files? Links
usually get the message 'exe not found or ... incremental build changed to
full'. I don't understand how incremental could ever work in a (n)make
based system. My understanding is that the exe is deleted if any dependent
source is later?
/GL was (accidentally?) left on by Qt in 4.5.0 for release builds. It is
really slow - the compiles utilise both CPUs, then the linker optimises
using only one CPU - and adds an extra 20 mins to the build time.
The 1,054 object files occupy 159Mb, debug exe is 20Mb, pdb file 53Mb, ilk
Maybe turning off the incremental link will save a bit? Though my boss
*hates* any changes to the supplied Qt sources ;O)
Qt-interest mailing list