2
votes

I have a Delphi project group (groupproj) of 290 projects (.dproj). It takes about 90 seconds to compile 365,000 lines of code.

I am using a notebook equipped with 12GB of RAM, SSD and dual core CPU (4 logical processors) to build the project group. By monitoring the resource meters during compilation, the RAM and SSD isn't a limit for the task. The CPU only use a single logical processor for the compilation and I think this is the design of Delphi compiler.

Is there any options to improve the compiling time significantly by using better hardware or build system like IncrediBuild?

Will better hardware environment (RAID-0, XEON) help much?

1
Why don't you compile the projects in parallel? Also, perhaps now is the time to reconsider the decision to have 290 projects rather than 1 project and 290 config files. - David Heffernan
Perhaps I didn't state clearly. I have one .groupproj file contains 290 .dproj - Chau Chee Yang
That was already quite clear. The only reason I can imagine for that many projects is that they are all basically the same project but with minor variations between them. But maybe I'm wrong. Maybe you really do have 290 projects that all have distinct code. Anyway, write a Python build script to compile in parallel is what I would do. - David Heffernan
Are you compiling from the IDE or from a command line? If you are compiling from the IDE, I'd test compiling from the command line to see if it does any difference. - Ken Bourassa
Among 290 .dproj files. Only one compile to .EXE and the rest are .BPL. There are relations among the BPLs. - Chau Chee Yang

1 Answers

0
votes

As you have identified that your build process is not I/O bound, using RAID or a better processor is not really going to help. If there are no dependencies in your build in terms of order, you could write a utility in Delphi that executed command line builds in a series of threads. This should allow you to spread the load across all your CPU cores. A simple Producer Consumer Queue structure and a series of worker threads should do the job nicely.