perf(scene): parallelize block AABB post-pass
Extends Phase 2.1. compute_block_aabbs resolved each defn's union AABB serially via defn_aabb_recursive, which only reads the finished defns map and re-walks shared nested defns with no memoization — real cost on block-heavy drawings. Split into a parallel read phase (per-name resolves fan out over rayon) and a serial write-back phase. BlockCache is Sync, so sharing &self across the read phase is sound. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
9b112ce12c
commit
44eea23c3f
2 changed files with 20 additions and 6 deletions
|
|
@ -114,7 +114,10 @@ No topological stratification was needed after all: `build_defn` stores
|
|||
nested INSERTs as by-name references (`LocalSub::Nested`) and never expands
|
||||
them at build time, so each defn depends only on the read-only `doc` — the
|
||||
builds are embarrassingly parallel. Now a plain rayon `par_iter().collect()`.
|
||||
`compute_block_aabbs` stays a serial post-pass (resolves nested refs, cheap).
|
||||
`compute_block_aabbs` is also parallelized: its `defn_aabb_recursive` walk is
|
||||
read-only over the finished `defns` map and re-walks shared nested defns
|
||||
(no memo), so the per-name resolves fan out across rayon (read phase), then a
|
||||
serial phase stores each AABB back.
|
||||
|
||||
### 2.2 Incremental wire cache (delta tessellation)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue