perf(session-projection): memoize raw views by state identity
Review follow-up: the per-step gate recomputed view(previous) on every changed apply — a property read for identity-stable views, but a fresh throwaway object p
Review follow-up: the per-step gate recomputed view(previous) on every changed apply — a property read for identity-stable views, but a fresh throwaway object per change for computing views. The registry now keeps a WeakMap from state object to raw view: the previous state's view was cached when that state was current, so each distinct state's view computes exactly once (gate and snapshot share th
- Date
- 2026-08-31
- Version
- master@12bef3b
- commit
- 12bef3b
Review follow-up: the per-step gate recomputed view(previous) on every changed apply — a property read for identity-stable views, but a fresh throwaway object per change for computing views. The registry now keeps a WeakMap from state object to raw view: the previous state's view was cached when that state was current, so each distinct state's view computes exactly once (gate and snapshot share th