You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
keys_highway_3d: updateScene iterates every note mesh each frame #95
Version:keys_highway_3d 0.2.3 (core main @ b7067cf) — not fixed on claude/keys-highway-bugs-ho8fs6
What happens
updateScene() loops over the whole noteMeshes array twice per frame: once for the camera span, and once for positions, label sprites and key glow. It also loops over every bar-number sprite. The cost grows with the length of the chart, not with how many notes are visible, and every note also carries its own label sprite and material. The core CLAUDE.md performance guidance recommends limiting per-frame work to the visible time window, using bundle.lowerBoundT or a cursor.
Suggested approach
_notation.playable is already sorted by time. Keep a lower-bound index for now - 0.4 (the earliest note still needed) and stop the loop once a note is past the far end of the highway (about 8.8 s ahead, plus the length of the longest note). Only notes crossing the window edges need their visibility toggled.
Impact
I haven't profiled this. For short charts it's probably negligible; long or dense piano scores (thousands of notes) are where it would show. Confidence: moderate that it's measurable, low on how large the effect is.
Opened PR #141 (#141) implementing issue #95: updateScene now window-walks the t-sorted note/marker arrays via advanceTWindow (delta-hide on exit, bounds from runway geometry + longest note, shared linger constants), with 10 new tests (1449/1449 full JS suite green, eslint clean) and a reviewfrog self-review whose three minor findings are all addressed.
Activity
pullfrog commentedon Sep 23, 2026
pullfrog commentedon Oct 6, 2026
Opened PR #141 (#141) implementing issue #95:
updateScenenow window-walks the t-sorted note/marker arrays viaadvanceTWindow(delta-hide on exit, bounds from runway geometry + longest note, shared linger constants), with 10 new tests (1449/1449 full JS suite green, eslint clean) and a reviewfrog self-review whose three minor findings are all addressed.Task list (2/7 completed)
big-pickle(free) | 𝕏perf(keys_highway_3d): window updateScene to the visible note span (#95)