Closed
Bug 1509226
Opened 6 years ago
Closed 6 years ago
Avoid allocations to define clips
Categories
(Core :: Graphics: WebRender, enhancement)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: mattwoodrow, Assigned: mattwoodrow)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Both versions of DefineClipChain use an nsTArray to collect the clips to be defined, which means at least 2 allocations for every new clip we encounter.
The two types (wr::WrClipId and size_t) are the same thing in-memory, so we should be able to use a single vector, and AutoTArray should stop us from allocating in all but the most extreme cases.
Doing this removes a few % from WR command building time.
Comment 1•6 years ago
|
||
I filed something like this in bug 1506172.
Assignee | ||
Comment 2•6 years ago
|
||
Uploading my patch anyway, since it's done.
I think we could land it now, and do the conversion to the properly exported rust type in 1506172 once the clip cleanup is done. Or we could just wait, it's not a huge performance difference. I don't mind.
Assignee | ||
Comment 3•6 years ago
|
||
MozReview-Commit-ID: CetmS5cZCMP
Depends on D12720
Comment 4•6 years ago
|
||
I'd rather use the same WrClipId in both places instead of asserting that size_t is the same type.
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d6509279d52e
Avoid allocations to serialize clips. r=jrmuizel
Comment 6•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Updated•3 years ago
|
Blocks: wr-displaylist-perf
You need to log in
before you can comment on or make changes to this bug.
Description
•