Closed Bug 1534012 Opened 5 years ago Closed 5 years ago

Consider to add a separate queue for window.postMessage and process it with lower priority during page load

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: smaug, Assigned: sefeng)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Facebook seems to use postMessage rather early during pageload, and it has some heavy event listener for the message event.

https://perfht.ml/2NQVDG8

Perhaps the postMessage queue which bug 1512388 needs can be used here.

Priority: -- → P3
Component: DOM → DOM: Core & HTML

Looks like this could affect positively to google-mail and yahoo-news. So worth to look at some more.

Assignee: nobody → sefeng

WPT bug that needs to be fixed first: https://github.com/web-platform-tests/wpt/issues/16540

Pushed by sefeng@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7fa8e33635fc
Use a low priority ThrottledEventQueue for postMessages during page load r=smaug

PostMessage Event uses "PostMessage task source" which is different
than "DOM manipulation task queue"; Update the code to use detail
object instead.

Depends on D27386

Regressions: 1550606
Pushed by sefeng@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ef5bf4372b76
Use a low priority ThrottledEventQueue for postMessages during page load r=smaug
https://hg.mozilla.org/integration/autoland/rev/55c360c47f31
Update postMessage usage in WPT for promise rejection r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/16925 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

== Change summary for alert #21015 (as of Tue, 21 May 2019 07:34:34 GMT) ==

Improvements:

26% raptor-tp6-yahoo-news-firefox loadtime windows10-64-shippable-qr opt 481.21 -> 356.17
26% raptor-tp6-yahoo-news-firefox loadtime windows10-64-shippable opt 481.83 -> 357.71
24% raptor-tp6-yahoo-news-firefox loadtime linux64-shippable-qr opt 510.21 -> 386.79
23% raptor-tp6-yahoo-news-firefox loadtime windows7-32-shippable opt 468.71 -> 362.00
21% raptor-tp6-yahoo-news-firefox loadtime linux64-shippable opt 465.96 -> 365.83
7% raptor-tp6-yahoo-news-firefox windows10-64-shippable opt 290.02 -> 268.48
7% raptor-tp6-yahoo-news-firefox windows10-64-shippable-qr opt 289.48 -> 268.46
5% raptor-tp6-yahoo-news-firefox windows7-32-shippable opt 286.52 -> 270.82
5% raptor-tp6-yahoo-news-firefox linux64-shippable opt 294.51 -> 279.56
5% raptor-tp6-yahoo-news-firefox linux64-shippable-qr opt 314.07 -> 298.39

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=21015

Flags: needinfo?(sefeng)

Updated a screenshot to show the performance changes between Firefox and Chrome for Yahoo News.

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

Attachment

General

Created:
Updated:
Size: