Accelerating the Build Process of an MFC Application

 Jason Barnaby, LUSAS


The development team for the LUSAS Modeller application has gained several hours of productivity each week by adopting IncrediBuild. LUSAS Modeller is part of the LUSAS suite - an analysis tool used in several different engineering industries. It is a large, MFC-based application. Developers who used to routinely spend several hours a week watching the compilation output scroll on and on can now be productive all day, every day. This article describes in detail the manner in which this was achieved.


The Challenge

LUSAS Modeller is a large, MFC-based application comprising over 3000 source files.

Using Microsoft's Visual Studio, a full debug clean and build would take around 3 hours on a single 3.0 GHz CPU. Even a small incremental build would often take over an hour. An additional problem was that, even after an hour's compilation, Microsoft Visual Studio's dependency checker would regularly have skipped files that should have been compiled, causing bizarre link-time and run-time errors. Often the only solution to fix such a corrupt build would be a full clean and compile.

Developers would adopt bad habits in order to avoid long compilations during the day. They would add global variables instead of adding function arguments, or use the 'extern' keyword instead of adding to a header file. Such code would then need to be revisited in the evening, before the overnight build.

This kind of working pattern naturally led to a decrease in productivity. The natural code/compile/run/test cycle would take so long that developers would end up revisiting the same code several times, often several hours apart, to address a single issue. Inevitably mistakes could be made, raising quality issues as well.

Occasionally, a full rebuild would simply be unavoidable, and the developer would be forced to find something else to do for several hours, whilst the compiler slowly churned away. This kind of distraction and forced loss of focus again raised both efficiency and quality problems.

Being in a safety-critical industry, QA testing is a vital part of our development process. At the end of each piece of work, we run thousands of test cases overnight to verify that regression bugs have not been introduced. Developers would typically leave a phased compile / link / QA cycle running as they went home each evening. Just one compilation or link error would lead to a failure to run the QA tests, effectively resulting in 24 hours lost against the project schedule.

The Alternatives

Before purchasing IncrediBuild, we had tried and considered several alternatives. Most obviously, we spent a lot of money on fast computers. Many developers would have more than one computer at their desk, so that they were still able to be productive whilst another machine was busy compiling. This solution was never satisfactory - it always seemed that as quickly as hardware speeds increased, developers would be expanding our code base more and more.

Another obvious alternative was to use precompiled modules or libraries with clear boundaries, in order to reduce the number of files that need to be recompiled for any given change. There are many drawbacks to this approach, the most obvious being that those other modules and libraries will need to be recompiled at some point, and if errors are introduced, the process of identifying and fixing them at a later date becomes long and difficult.

The Solution

We found integration of IncrediBuild to be completely straightforward. We downloaded the trial version, installed it on a dozen or so computers and were up and running within half a day. With help from Xoreax support, we subsequently spent some time optimising our project settings to ensure that multiple dependencies of the main project could be compiled simultaneously, reducing our compile times still further. Within a few days we had reduced our compilation times from hours to minutes. See the table below for accurate timings on a 3.0 GHz PC.

(Note that all these times exclude linking - typically an extra minute or two in each case.)

Now that we are used to working with IncrediBuild, developers no longer feel scared to modify low-level header files. It is never necessary to introduce hacks to avoid long compiles - and developers can always make a proper fix and test it within just a few minutes - no matter how many files need recompiling.

An additional benefit is that IncrediBuild recalculates dependencies before each and every build. Whilst recalculating dependencies with Microsoft Visual Studio would typically take several minutes, and often be wrong, IncrediBuild does it in less than one second and gets it right every time. We have not had a single corrupt build since we began routinely using IncrediBuild.

Developers can now ensure that they have a clean compile and link before starting the overnight QA - therefore never wasting a whole day as used to happen so often.


Adopting IncrediBuild within the development environment at LUSAS has given a major boost to our productivity. Additionally, we are convinced that the quality of our software development has been improved, as a direct result of reduced build times.


LUSAS is the trading name of Finite Element Analysis Ltd., a UK-based specialist engineering analysis software developer that develops a range of software products, based on the LUSAS finite element system. The software is used for all types of linear and nonlinear stress, dynamic, and thermal / field analysis problems in all branches of the engineering industry. For more information, please visit

About the Author

Jason Barnaby is a Project Manager at LUSAS, responsible for the development of LUSAS Modeller, the interactive part of the LUSAS suite.