Closed Bug 1534012 Opened 2 years ago Closed 2 years ago

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


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




Tracking Status
firefox69 --- fixed


(Reporter: smaug, Assigned: sefeng)


(Blocks 1 open bug)



(3 files)

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

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:

Pushed by
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
Use a low priority ThrottledEventQueue for postMessages during page load r=smaug
Update postMessage usage in WPT for promise rejection r=smaug
Created web-platform-tests PR for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

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


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:

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.