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
Ring: the open animation's first frames, and the breath and mist modes, cost more than they need #211
Left over from the ring performance audit of November 2026 (#210 did the larger part). These cost more per frame than they need to, and all of them fall while the ring is appearing.
Measured off screen with the real renderer, 16-slot ring at 150% scaling, before #210:
The first 100 ms of every open. While the static layer fades in, _base in zorbit/ring.py makes a faded copy, a point lookup, a lighter and a new canvas on every frame: about 5 ms a frame against 0.4 ms once it is cached, for about ten frames.
Breath. A full-canvas image and a GaussianBlur for the halo on every frame for 900 ms: about 31 ms a frame, 14 ms of it the blur. Blurring a quarter-size halo and scaling it up took 0.2 to 3.4 ms on a test canvas.
Ripple, breath and mist. A GaussianBlur per disc on every frame. Mist was about 26 ms a frame, 49 ms at worst.
Ideas:
Make the hit-disc mask once per static layer and fade only the alpha band.
Blur the halo at quarter size.
Keep blurred sprites per rounded blur step.
A further step that was not measured: dirty rectangles. UpdateLayeredWindowIndirect with prcDirty, composing and premultiplying only the changed box. A hover changes about 13% of the window. It is a bigger change (overlapping labels and glows, fans) and should wait for a live measurement that says the hover frame still matters after #210.
Any change here has to keep the animation frames as they are, or the pictures made by tools/ring_shots.py need retaking and looking over.
Activity