performancedelphidelphi-xe

Delphi XE compiler speed slow


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

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?


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