Closed Bug 1644403 Opened 4 years ago Closed 4 years ago

Do not use Clone on CloneableAutoTArray

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox-esr68 --- unaffected
firefox77 --- unaffected
firefox78 --- wontfix
firefox79 --- fixed

People

(Reporter: sg, Assigned: sg)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

As was mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1626570#c118, there were some performance regressions in connection with the introduction of CopyableAutoTArray, in particular with WebAudio.

This is likely to be caused by missed optimization / copy elision opportunities due to the calling of the base class' Clone method which returns an AutoTArray instead of a CopyableAutoTArray. Changing this to an ordinary copy reverts the performance regression as can be observed here:

https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=mozilla-central&newProject=try&newRevision=85724fd24502163650b7e5e4378d15d52baa3b88&originalSignature=1931866&newSignature=1904634&framework=10&selectedTimeRange=172800

CopyableAutoTArray should be deleted to avoid doing this accidentally as in this case.

Bugbug thinks this bug is a defect, but please change it back in case of error.

Type: task → defect

Set release status flags based on info from the regressing bug 1626570

I am not sure if this should be regarded a defect. It does not fix a functional issue, but reverts a performance regression, which I am not sure is significant enough to be regarded a defect.

Nice find, thanks for looking into this!

Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/53776f985a81 Fix inconsistent uses of CopyableAutoTArray and Clone. r=froydnj
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: