C++Builder XE2 Compilation Times

TwineCompile - Cut C++Builder compile times by up to 50x!
Post Reply
JonathanW
Posts: 1
Joined: Tue Oct 28, 2014 1:49 pm

C++Builder XE2 Compilation Times

Post by JonathanW »

We are currently using TwineCompile version 3.6.0.272 with C++Builder 5 and C++Builder XE2.

One of our largest projects has about 400,000 lines of code over 700 source files. When building this project under C++Builder 5, TwineCompile made a huge improvement, dropping our compile times from over 30 minutes to less then 1 minute.

We are now working on bringing the project over to C++Builder XE2. The source remains the same but a new set of project files has been created. Unfortunately, enabling TwineCompile on this project causes build times to increase. With TwineCompile disabled, the project compile time is about 134 seconds. With TwineCompile enabled, compile time increases to 276 seconds.

I have found that if I select the option "Use PCH File for Each Thread", the compile time using TwineCompile drops to about 90 seconds. But I'm a bit fuzzy what this option actually does, and I was under the impression that I should not have that option selected because my project uses a common header file. Is this correct? Are there any other settings which might improve my compile times?

Thanks in advance!
jomitech
Site Admin
Posts: 2153
Joined: Wed Oct 08, 2008 12:23 am

Re: C++Builder XE2 Compilation Times

Post by jomitech »

That setting is good to use if you don't have an injected header file. It makes sure that each thread uses a separate PCH file, which allows the C++Builder compiler to keep updating the PCH file. With that option off, only the first file generates the PCH file, and all subsequent files just read it. If the project does not have a consistent header structure, this can negate the benefit of the single PCH file.
Jon
Post Reply