Skip to content

Conversation

wdconinc
Copy link
Contributor

@wdconinc wdconinc commented Sep 1, 2025

Briefly, what does this PR introduce?

To speed up CI builds, we can use unity builds, essentially bundling multiple source files in a single source file per library, and compiling in one go. This speeds up a non-ccache compilation locally from

        Elapsed (wall clock) time (h:mm:ss or m:ss): 6:37.68

to

        Elapsed (wall clock) time (h:mm:ss or m:ss): 4:15.68

(Methodology: rm -rf build && cmake -Bbuild -S. -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=24 --fresh && /usr/bin/time -v make -Cbuild -j8 install)

Unity builds are not without their drawbacks. It requires that the different source files can coexist in a single source file. They cannot define functions with the same name in the same namespace. It is in general a good practice to avoid these conflicts (by defining them once), so in addition to the benefit of faster compilation, this is a useful for the code base quality.

Needs:

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

No.

Does this PR change default behavior?

No.

@wdconinc wdconinc marked this pull request as draft September 1, 2025 22:47
@github-actions github-actions bot added topic: calorimetry relates to calorimetry topic: tracking Relates to tracking reconstruction topic: PID Relates to PID reconstruction topic: far-forward Far forward reconstruction topic: far-backward Reconstruction related to far backward detectors labels Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: calorimetry relates to calorimetry topic: far-backward Reconstruction related to far backward detectors topic: far-forward Far forward reconstruction topic: infrastructure topic: PID Relates to PID reconstruction topic: tracking Relates to tracking reconstruction

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant