pub type ItemDedupCache = Arc<ItemDedupCacheState>;Expand description
Shared content-dedup cache: maps a 128-bit structural item hash to the
LOCAL (pre-placement, void-free, colour-free) item mesh PLUS its precomputed
instancing rep_identity (Some when instancing tagged it, else None).
Storing the rep beside the mesh lets a cache hit stamp it without re-running
the O(verts) compute_mesh_hash_full per occurrence. Build ONE per loaded
model with crate::GeometryRouter::new_dedup_cache and inject it into
every per-element / per-batch router via
crate::GeometryRouter::enable_content_dedup_shared so byte-identical
geometry is meshed once regardless of how the work is partitioned across
threads/batches.
Also carries diagnostic_claimed (#4083, double-count half only — see
[ItemDedupCacheState::claim_diagnostic]): a SEPARATE small key set, not a
diagnostic payload attached to meshes. It never changes what a mesh-cache
HIT returns (still no diagnostic — that omission half of #4083 is
untouched) and never gates mesh computation; it only lets two racing
routers that both MISS the (structurally identical) mesh cache agree on
which ONE of them keeps the CSG diagnostic it independently recorded for
that miss, so one logical operation is not counted twice.
Aliased Type§
pub struct ItemDedupCache { /* private fields */ }