Skip to content

CI: log precompiled header sizes after Windows Build#6340

Merged
Fedr merged 2 commits into
masterfrom
ci/log-windows-pch-sizes
Jun 28, 2026
Merged

CI: log precompiled header sizes after Windows Build#6340
Fedr merged 2 commits into
masterfrom
ci/log-windows-pch-sizes

Conversation

@Fedr

@Fedr Fedr commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Adds a step after the Windows Build that logs the size of every precompiled header produced by the MRPch, MRMesh and MRViewer projects, so PCH growth is visible directly in the build log.

Details

  • Both build systems write their PCH files under source\TempOutput:
    • MSBuild emits one MRPch.pch per project IntDir (with MR_PCH_USE_EXTRA_HEADERS=ON, MRMesh and MRViewer build their own; MRPch always does).
    • CMake/Ninja emits cmake_pch.cxx.pch (each of MRPch/MRMesh/MRViewer builds its own when the extra headers are on).
  • A recursive *.pch scan covers both layouts and prints a Size (MB) / Path table. The body lives in scripts/diagnostics/windows-pch-sizes.ps1.
  • Runs with continue-on-error: true so it never masks a build failure, and bails out cleanly if the build directory doesn't exist.

CI-only change; no library or product code affected. All non-Windows platforms disabled.

Measured sizes (run 28318048245, MB)

CMake / Ninja (cmake_pch.cxx.pch)

Job MRPch MRMesh MRViewer
msvc-2019 Debug · iterator-debug 1,425.44 613.12 677.94
msvc-2019 Debug · vs2019 1,395.81 600.94 665.19
msvc-2019 Release · vs2019 1,384.81 596.19 660.25
msvc-2026 Debug · meshlib 1,253.94 578.06 627.81
msvc-2026 Release · meshlib 1,247.25 573.81 623.38
msvc-2022 Debug · vs2022 1,230.87 567.88 617.31
msvc-2022 Release · vs2022 1,224.12 563.56 612.75

MSBuild (MRPch.pch)

Job MRPch MRMesh MRViewer
msvc-2019 Debug · vs2019 902.69 380.62 419.00
msvc-2019 Release · vs2019 895.69 377.62 415.87
msvc-2026 Debug · meshlib 844.94 376.12 416.62
msvc-2026 Release · meshlib 840.62 373.44 413.75
msvc-2022 Debug · vs2022 821.44 365.62 405.69
msvc-2022 Release · vs2022 813.56 362.94 402.81

Notes: CMake PCHs are ~2× the MSBuild ones; MRPch is the largest (full shared header incl. OpenVDB), MRMesh drops the viewer/imgui section; msvc-2019 produces the biggest PCHs, msvc-2022 the smallest.

Add a step after the Windows Build that reports the size of every
precompiled header produced by the MRPch, MRMesh and MRViewer projects.
Both build systems write PCH files under source\TempOutput (MSBuild emits
one MRPch.pch per project IntDir; CMake/Ninja emits cmake_pch.hxx.pch),
so a recursive *.pch scan covers either path. Runs with always() and
continue-on-error so it never masks a build failure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the precompiled-header size report (and its comment) out of the
Windows workflow into scripts/diagnostics/windows-pch-sizes.ps1, matching
the other windows-*.ps1 diagnostics. Drop the always() guard so the step
runs in the normal step order; continue-on-error keeps it from masking a
build failure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Fedr Fedr added the full-ci run all steps label Jun 28, 2026
@Fedr Fedr merged commit 72df3c7 into master Jun 28, 2026
47 checks passed
@Fedr Fedr deleted the ci/log-windows-pch-sizes branch June 28, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant