perf(ui): reuse handles vector in WebGPU custom Dispatch (#132) #148

Merged
catbot merged 1 commit from claude/issue-132 into master 2026-06-18 15:54:36 +02:00

1 commit

Author SHA1 Message Date
catbot
cb650f965d perf(ui): reuse handles vector in WebGPU custom Dispatch (#132)
UIRenderer::Dispatch built a fresh std::vector<uint32_t> with reserve on
every call, paying one malloc+free per dispatch. Custom compute dispatches
run per-frame, so make the vector thread_local and clear() it each call:
capacity grows to the high-water mark once and is reused thereafter,
eliminating the per-frame allocation churn. Behavior is identical.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 13:54:09 +00:00