[Qt-interest] Making VS links faster

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Tue Aug 25 10:02:36 CEST 2009


Hi Everybody, 

@SABROG: Thanks for the link, and it might be worth considering.  Most UI
changes still involve new widgets, so no big advantage to build times.  Will
definitely consider this later.  

@Bill King: I'm not sure why the configure option would make any difference?
Web kit is only linked to if the project contains QT += webkit?  In this
case, web kit is being used, so it has to be in the project. 

@Thiago: Thanks for that confirmation. That link didn't work, but I'll
browse fursther. There seem to be plenty of examples in the Qt sources
themselves? 

I'll post again, if I find anything that makes a big difference. 

Thanks again for the help, guys. 


> -----Original Message-----
> Hi Everybody, 
> 
> 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.  Most 
> development is done on win.  During the day, the builds do 
> get faster, as more files are cached by the system, but even 
> with only one source file to compile, the link still takes 
> two minutes.  On mac, the same situation builds in 20-30 secs. 
> 
> It would be nice if the moc output from the headers could be 
> just compiled with the associated cpp file, instead of 
> producing a separate obj file.  I know that it is necessary 
> to include the moc in the cpp file, if the cpp file contains 
> object decalarations with Q_OBJECT.  Is there a qmake switch 
> that forces .h file moc objects to be included in the cpp, as 
> well, instead of being separately compiled?  Alternatively, 
> if I always include the moc in the cpp, will qmake suppress 
> compiling the moc output separately? 
> 
> I realise that 4.5.0 had an issue with a linker switch for 
> release that caused the link time to be twice as long.  All 
> of our projects have been cleaned and rebuilt many times since then. 
> 
> Interestingly, running qmake on this project is at least ten 
> times faster on mac as well, compared to win.  The mac is an 
> iMac with OSX 10.5.8 and XCode, the win is a Dell Precision 
> laptop with 7200 rpm disk drive and XPSP3.  CPU speeds are 
> pretty similar. 
> 
> Regards, 
> 
> Tony.





More information about the Qt-interest-old mailing list