Skip to content

perf: cheaper frames for cameras without damping and on standby - #189

Merged
kvvasuu merged 5 commits into
mainfrom
perf/frame-tweaks
Dec 4, 2026
Merged

kvvasuu merged 5 commits into
mainfrom
perf/frame-tweaks

Conversation

@kvvasuu

@kvvasuu kvvasuu commented Dec 4, 2026

Copy link
Copy Markdown
Member
  • TargetRegistry reads a target from the scene on its first use in a frame, through the new readSlot(slot), so targets that only standby cameras follow are not read. One running camera among 10 registered targets takes 59% less time, among 50 targets 77% less. A target moved in a klipp.registerUpdate callback is now followed in the same frame.
  • Follow and OrbitFollow without damping skip the damping frame: 971 → 685 ns per Follow update.
  • Scalar damping with no damping time and no maxSpeed snaps to its target without a spring step: KlippControls frames take 14-24% less time.
  • RotationComposer and PositionComposer track the target's speed only with lookaheadTime: 12-28% less time without it.
  • CameraMixer skips draining an empty event queue: about half the time of a mixer's frame step.
  • Benches for Follow without damping and for one reader among many registered targets.

@kvvasuu
kvvasuu merged commit 3dc989f into main Dec 4, 2026
1 check passed
@kvvasuu
kvvasuu deleted the perf/frame-tweaks branch December 4, 2026 22:48
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