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
[WASM] Reduce record-phase cost for WebGPU and Skia #26047
Make the per-frame record phase cheaper on WebAssembly, where it limits the frame rate under the Mono interpreter, especially with the WebGPU backend.
Profiling RealWorld_SpotlightMenu shows two hot spots:
WebGpuCommandRecorder.Concat takes ~44% of WebGPU recording. Every visual's offset goes through a full Matrix4x4 multiply, which runs as scalar code under the interpreter. The recorder's save stack is also regrown from empty on every recording.
Matrix3x2Extensions.Transform(Rect), used by visual culling for every visual on every frame on all backends, transforms four corners and takes their min/max even when the matrix is a plain translation.
Why is this needed? 🤔
On a Pixel Tablet (interpreter build), the record phase costs 81 ms per frame for WebGPU and 42 ms for Skia/WebGL on RealWorld_SpotlightMenu. That caps those backends at 15 and 22 fps.
For which platforms 📱💻🖥️
WebAssembly
Anything else we need to know? 💬
Both costs are mostly plain 2D translations, the most common visual transform, so a translation fast path removes most of them.
Activity