Skip to content

Proposal: content-addressed CastXML cache to accelerate Python wrapping builds (parked PR #6533) #6566

Description

@hjmjohnson

TL;DR: PR #6533 adds a content-addressed cache for CastXML output (plus two latent pkl-tracking correctness fixes) to the Python wrapping pipeline. Measured on ITK's own CI: ~31 min saved per 2-core Azure Python build (median 175 → 144 min, −18%; best same-code pair −20%), up to −64% on cold GHA runners when combined with ccache, and the same benefit applies to warm local rebuilds on low-core machines. Populating the cache costs nothing (cold runs match the no-cache median).

The implementation is complete and validated — a 49-test cross-platform suite runs as a WrappingInfrastructure ctest on the Linux/macOS/ARM Python CI legs, and all checks are green — but it is a nontrivial change to wrapping infrastructure and deserves deliberate review, not a drive-by merge.

Status: parked. The PR is closed as a draft side-quest and will only move forward if there is community interest in reviewing and accepting the approach. If this would help your CI or local wrapping builds, please comment here or on #6533.

How it works (one paragraph)

A transparent wrapper around the CastXML binary keys each invocation two ways: L1 = hash of the inputs (binary content, .cxx, include flags) for an instant hit with dependency + include-dir validation, and L2 = hash of the preprocessed translation unit (castxml -E, line markers stripped), which is path-independent so any build tree on the same source shares entries. Hits restore the gzipped XML output; misses run CastXML and store it. Concurrency-safe, size-capped with eviction, wired into the Azure/GHA CI caches. Full measurements and design details in the PR #6533 description.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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