Closed Bug 1363445 Opened 4 years ago Closed 4 years ago

MessageChannel.addListener is a bit too expensive

Categories

(WebExtensions :: General, defect)

defect
Not set
normal

Tracking

(firefox54 wontfix, firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox54 --- wontfix
firefox55 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

Details

Attachments

(1 file)

It gets called a lot.
Comment on attachment 8865947 [details]
Bug 1363445: Speed up MessageChannel.addListener.

https://reviewboard.mozilla.org/r/137536/#review140700

Looks like there are only a few places where these are called without an array, we could change it to always take an array but this works too...
Attachment #8865947 - Flags: review?(aswan) → review+
Comment on attachment 8865947 [details]
Bug 1363445: Speed up MessageChannel.addListener.

Approval Request Comment
[Feature/Bug causing the regression]: N/A
[User impact if declined]: This change improves performance in a few key areas, especially when WebExtensions are enabled.
[Is this code covered by automated tests?]: Yes.
[Has the fix been verified in Nightly?]: No.
[Needs manual test from QE? If yes, steps to reproduce]: N/A 
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: No
[Why is the change risky/not risky?]: This is a minor change that simply replaces a relatively expensive operation with a cheaper equivalent.
[String changes made/needed]: None
Attachment #8865947 - Flags: approval-mozilla-beta?
Thanks Kris. Calling out that we'd love to see this uplifted to 54 given the improvement it causes in tests with Screenshots enabled.
https://hg.mozilla.org/mozilla-central/rev/151d199e0b37
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Screenshots will go live in Fx55 so we don't have to uplift these patches in 54. Beta54-. Mark 54 won't fix.
Attachment #8865947 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.