Quantcast
Channel: Delphi – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 1445

Optimized Pascal compilation time | Fredrik Haglund’s blog

$
0
0

Long uses lists especially of units circularly referencing each other are killing for compiler performance both in CPU and memory consumption.

To solve it:

Ingredients

  • ICARUS – a free tool from the maker of Pascal Analyzer. [WayBackhttp://www.peganza.com/products.htm. Icarus parses Delphi or Borland Pascal source code and generates a Uses Report. This report will help you remove unneeded units from your uses lists. You will also know which units that can be moved from the interface uses list to the implementation uses list.
  • Uses Cleanup Tool – by Oleg Zhukov [WayBackhttp://cc.borland.com/Item.aspx?id=23199.

Step-by-step

  1. Run ICARUS on your delphi project to get a report of which units depends on each other.
  2. Input this report in the Uses Cleanup tool to automatically update all uses-clauses in your source code.
  3. Delete all DCU-files and recompile.

Source: [WayBackOptimized Pascal compilation time | Fredrik Haglund’s blog

Edit

Bit-rot galore!: Since Fredrik published his article, some links have vanished, so they are invalid in the above quote as well:

Uwe Raabe was the first to notice on [WayBack] G+ Long uses lists especially of units circularly referencing each other are killing for compiler performance both in CPU and memory consumption… – Jeroen Wiert Pluimers – Google+ that the Uses Cleanup Tool by Oleg Zhukov can now be downloaded from [WayBackFiles as [WayBackUsesCleanupceaf.zip.

Several people suggest using cnPack in the above G+ thread, but [WayBacktheir Delphi parser is far behind [WayBack] Delphi AST.

Cleaning uses lists is a tough thing, it very much depends in getting the dependencies really right, then interpreting them correctly.

–jeroen


Viewing all articles
Browse latest Browse all 1445

Trending Articles