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
[Flutter GPU] Uniform and texture binds marshal the slot name across the FFI boundary on every call #189819
RenderPass.bindUniform and RenderPass.bindTexture pass the uniform's name as a Dart string handle on every call. The native side then allocates a std::string via tonic::StdStringFromDart and resolves the binding with a string-keyed map lookup, per bind, per draw, per frame, even though the resolution result never changes for a given shader between reloads.
In draw-heavy scenes this is a measurable share of main-thread frame time. In a renderer submitting ~10k draws per frame (2 uniform binds and 1 texture bind per draw), the name marshal and lookups account for roughly 7-12% of the CPU render phase on macOS/Metal in profile mode.
The reflection data is immutable between shader reloads, so the binding can be resolved to a stable index once and reused. Proposal in the linked PR.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[Flutter GPU] Bind uniforms and textures by cached reflection index (f…
github-actions commentedon Aug 13, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.