@@ -71,4 +71,40 @@ o2physics_add_library(FITCutParHolder
7171
7272o2physics_target_root_dictionary (FITCutParHolder
7373 HEADERS FITCutParHolder.h
74- LINKDEF FITCutParHolderLinkDef.h )
74+ LINKDEF FITCutParHolderLinkDef.h )
75+ # Precompiled header shared across PWGUD. Percentages are the share of the
76+ # group's workflow translation units that include the header, measured over the tree.
77+ # UDTables.h is the group's single shared data model.
78+ #
79+ # runDataProcessing.h is deliberately NOT precompiled: it requires each workflow's
80+ # customize() to be declared before it is included, so precompiling it silently
81+ # unregisters every option (the binary aborts at --dump-workflow, but links fine).
82+ #
83+ # Skipped under recc, which caches compilations remotely instead.
84+ add_library (UDTablesPCH OBJECT udTablesPCH.cxx )
85+ # The PCH compile is one of the heaviest translation units in the tree -- it
86+ # instantiates the whole data model up front -- but add_library() does not put
87+ # it in the 'analysis' job pool that o2physics_add_dpl_workflow() uses for the
88+ # workflows. Left out, it runs unthrottled alongside the pooled compilations
89+ # and defeats the per-job memory budget the pool exists to enforce.
90+ set_property (TARGET UDTablesPCH PROPERTY JOB_POOL_COMPILE analysis)
91+ target_link_libraries (UDTablesPCH PUBLIC O2::Framework O2Physics::AnalysisCore )
92+ if (NOT DEFINED ENV{USE_RECC})
93+ target_precompile_headers (UDTablesPCH PRIVATE
94+ # Framework baseline — same set AnalysisPCH precompiles. A target with
95+ # REUSE_FROM uses ONLY this PCH, so anything left out here is parsed from
96+ # scratch by every consumer: without this block these workflows were
97+ # precompiling LESS than the default carrier they opted out of.
98+ <Framework/ASoA.h>
99+ <Framework/AnalysisDataModel.h>
100+ <Framework/AnalysisHelpers.h>
101+ <Framework/AnalysisTask.h>
102+ <Framework/ConfigContext.h>
103+ <Framework/Configurable.h>
104+ <Framework/DataProcessorSpec.h>
105+ <Framework/HistogramRegistry.h>
106+ <Framework/HistogramSpec.h>
107+ <Framework/InitContext.h>
108+ [[ "PWGUD/DataModel/UDTables.h"]] # 79%, ~650 lines
109+ )
110+ endif ()
0 commit comments