Delphi FAQ: Ways to improve compile speed - ideasawakened/DelphiKB GitHub Wiki

Marco Cantu has a definitive blog post on this topic from December 2022: Some Suggestions to Help the Delphi Compiler Post saved to the WebArchive

Compile Speed Related Topics

Invalid Search Path or Library Path Entries

  • Invalid paths cause repeated lookup failures
  • Small app test with invalid path 40.3 seconds, fixed paths: 1.7 seconds

Source Code Files on UNC drives

  • Local SSD / NVMe drives suggested for large increase in compiling speed

Unit Aliases

  • Aliases add extra work to the compiler, penalty is small but best not to use aliases
  • No longer part of new projects, but was common in old code WinTypes=Windows;WinProcs=Windows;DbiProcs=BDE;DbiTypes=BDE;DbiErrs=BDE

Unit Scope Names

Circular Unit References

  • One of the most critical issues
  • Reorganizing uses statements to avoid circular references has reduced some projects compilation time 90%

Repeated Generic Types Instances

  • Create shared instances of generic types whenever possible.
  • Example: Create type TListOfStrings = TList<string>; and use TListOfStrings instead of defining the same generic type in multiple units

Disable Show Compiler Progress

⚠️ **GitHub.com Fallback** ⚠️