Closed Bug 1676305 Opened 4 years ago Closed 4 years ago

SWGL BufferData is slow because of malloc bottlenecks

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We seem to be spending a lot of time inside BufferData in SWGL due to update_vbo_data calls from WR. The buffer reallocation in SWGL is too simplistic, calling realloc every time the size changes. If we just keep around the memory, remember its capacity, and just bump the size within the capacity when applicable, we can avoid most reallocations and save a few percentage points on the profile.

Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/20964901b728 cache allocated memory inside SWGL VBOs to speed up allocation. r=gw
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: