Skip to content

Add runtime package to prevent DCU recompliation #379

@darianmiller

Description

@darianmiller

It's a minor issue for sure - but when you are running tests all day every day, rebuilding the DUnitX dcu's degrades performance a little.

On my simple test project with 29,319 lines of code it takes 1.1 seconds to build. But, if you use a DUnitX runtime package and refer to those prebuild DCUs then it drops to 7,145 lines of code in 0.5 seconds. Do that 50 times a day and you save a whopping 30 seconds. :) (Of course, multiply that by the number of times DUnitX based projects are built around the world every day and it adds up a little more.)

I disabled the built-in DUnitX and use the latest from the repo (based on your repo's Readme)

Then, trying to follow your blog advice to create a package:

  • Within the DUnitX base folder, I created a new Packages\RAD Studio 13 Florence folder
  • In RAD Studio, I created a runtime package named DUnitXRun within that folder.
  • Made the package Runtime only and set Explicit rebuild within Project->Options->Description
  • Ensured Win32 + Win64 Target Platforms exist
  • I added all the DUnitX units found in my projects output folder
  • Built a Release build for both platforms
  • Then added their paths to Tools->Options->Language->Delphi->Library for Win32 and Win64
  • Remove any custom project search paths to the DUnitX source
  • Enjoy the 0.5 second builds instead of the 1.1 second original builds

https://www.finalbuilder.com/resources/blogs/advice-for-delphi-library-authors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions