Closed Bug 1850357 Opened 1 year ago Closed 1 year ago

Avoid an allocation in DrawEventRecorderPrivate::DetachResources

Categories

(Core :: Graphics, task)

task

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: mstange, Assigned: mstange)

Details

Attachments

(2 files, 3 obsolete files)

It appears that, on Windows, the constructors of unordered_map and unordered_set allocate memory: https://share.firefox.dev/45q3ktD

I'll try to change this to use the move constructor.

Attachment #9350463 - Attachment is obsolete: true

On Windows, unordered_set appears to allocate memory for empty sets.

On Windows, unordered_map appears to allocate memory for empty sets.

Depends on D186952

On Windows, unordered_set appears to allocate memory for empty sets.

On Windows, unordered_map appears to allocate memory for empty sets.

Depends on D186958

Attachment #9350477 - Attachment is obsolete: true
Attachment #9350478 - Attachment is obsolete: true
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/eef78049649b Use nsTHashSet in DrawEventRecorder instead of unordered_set. r=jrmuizel https://hg.mozilla.org/integration/autoland/rev/abbb0b7a761b Use nsTHashMap in DrawEventRecorder instead of unordered_map. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch

Before: https://share.firefox.dev/3qHJTxG 301 samples
After: https://share.firefox.dev/3qZY690 64 samples

On nightly, the free(nullptr) shows up a little still.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: