Skip to content

perf: stop cache localNode invalidate bubble (sticky cacheAsBitmap) - #7

Open
roncarbot wants to merge 1 commit into
devfrom
feature/render-perf
Open

perf: stop cache localNode invalidate bubble (sticky cacheAsBitmap)#7
roncarbot wants to merge 1 commit into
devfrom
feature/render-perf

Conversation

@roncarbot

@roncarbot roncarbot commented Sep 9, 2026

Copy link
Copy Markdown

Summary

  • Do not bubble ContainerNode.invalidate() into transformDisabled parents (cache RTT / localNode).
  • Skip SCENE_TRANSFORM-only invalidate on cache localNode.
  • Mark ancestor CacheRenderers dirty on add/remove and real child moves inside a cache.

Fixes Diggy whole-title cacheAsBitmap rebuilding the RTT every frame (hold-frame timeline mtx → child SCENE_TRANSFORM → localNode → CacheRenderer). Pairs with awayjs/renderer#35 and awayjs/scene render-perf.

Test plan

  • Diggy title whole-cache: median 16.7 ms, cacheRenders=0, visual OK @ 30 fps
  • Diggy per-child cache: 16.7 ms, ~11 draws, visual OK
  • Diggy baseline (no cache): still ~83 ms / 233 draws

Diggy gameplay unlock (2026-09-09)

Unlocked via localhost.coolmathgames.com; in-level median 50 ms, ~254 draws, cacheRenders=0 (GroundFG LAYER/ERASE not → renderToImage yet). Title kids cache still 16.7 ms. See renderer#35.

E10 (no new view commit)

Diggy menu l1–l7 sticky cache validated on coolmath host: 100→16.7 ms, 370→~53 draws, cacheRenders=0 (parallax transform-only).

Do not bubble ContainerNode.invalidate into transformDisabled parents
(cache RTT space). Skip SCENE_TRANSFORM-only invalidate on localNode.
Mark ancestor CacheRenderers dirty on add/remove and real child moves.
Fixes Diggy parent-cache dirty-every-frame loop (E8).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant