[perf] UIRenderer::Dispatch heap-allocates a std::vector per custom dispatch (UI-WebGPU.cpp) #132
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Graphics#132
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by an adversarially-verified performance audit (confirmed real after a skeptic pass).
Location:
implementations/Crafter.Graphics-UI-WebGPU.cpp:180-207Severity: low · Effort: trivial · Category: allocation
Problem
UIRenderer::Dispatchbuilds astd::vector<uint32_t> handleswithreserve, forcing one malloc+free per dispatch; custom compute dispatches run per-frame. The count is bounded and known at pipeline-load.Fix
Fixed-capacity
std::array<uint32_t, kMaxBindings>or a reusedthread_localvector. Secondary WebGPU path, modest absolute cost.