Question

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?

Was it helpful?

Solution

As David noted, Delphi compilation is usually disk bound. The most likely explanation is that your SSDs are in various states of "break-in". Even the exact same SSD will perform differently over its lifecycle. Fresh out of the box SSDs have extremely high peak performance that degrades dramatically as the drive starts to build up a use-history. Especially with rather new systems you will see that the SSD performance will change rapidly until the drive is "broken in" and settles at a roughly steady state level.

Many other factors can affect SSD performance as well and a raw benchmark will not reproduce the real-world conditions that can affect the drive's ability leverage its cache or other available performance optimizations.

If you're really interested, this is a good read from the Storage Networking Industry Association on the topic :

Understanding SSD Performance Using the SNIA SSS Performance Test Specification

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top