During our quest to optimize Delphi compile time in general we found some strange difference of compile time between different PCs.
The problem is that on some PCs “raw” compile time is 2 times faster than the slow ones and we simply can’t explain why this should be the case.
Test Setup
We tested compile time on 3 different PCs with almost identical configuration. The is PC’s delivered and configured from our IT department with Windows 7 Enterprise 64 bit, service pack 1.
Delphi is installed by ourselves and is Delphi XE with update 1.
Hw spec is almost identical with Core i7-3770 3,4 GHz 8G Ram and 256 Gb SSD disk.
We benchmarked all 3 PCs with almost identical performance on general system, disk and ram.
We performed the test with use of command line compilation with dcc32.exe. We tested on different project, all extracted from common source repository.
Tests
After a lot of tests where we looked at different Delphi environment configuration as well as Windows 7 setup. All the test showed similar performance on 2 of the PCs and 1 PC running twice as fast.
Finally we made a simple test file with 1 simple class and a lot of lines which increment a variable. The test file is 32 Mb and is compiled on the fast PC in 1.3s. On the 2 other PCs it takes >3s
Command to do the compile:
"c:\program files (x86)\embarcadero\rad studio\8.0\bin\dcc32.exe" -$O- -$W+ -$J+ -$YD --no-config -B -Q -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG; -U;"c:\program files (x86)\embarcadero\rad studio\8.0\lib\Win32\release" -V -VN -K00400000 -GD -NBDcp -NHHpp -NODcp ..\Test.pas
Any idea why compile time is that different on almost identical PCs?
Which tests could we do to troubleshoot the issue?