Prepare HttpHandler AcceptLanguages during process pre-allocation
Categories
(Core :: Networking: HTTP, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: jesup, Assigned: jesup)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fission-perf])
Attachments
(1 file)
At the first load a process does, we collect the AcceptLanguages strings and mark it clean; this can take 3-4ms on a fast SSD machine (linux at least, likely similar for mac/windows). This occurs during fission process-switch when a new process is allocated (i.e. often) and at a critical time since this delays important parts of the initial load.
If we can set the AcceptLanguages during preallocation it will already be 'clean' and we should see a ~10% reduction in process-switch time.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
The time is mostly in reading the files for the localized string, mostly due to the sandbox I believe.
I don't think we can avoid the normal logic to set it when it's dirty (when prefs change), but we could ship the current value to the content process at startup instead of calling SetAcceptLanguages directly. We'd have to make sure we instantiated nsHttpHandler at this time though to ensure we catch any pref changes, and there might be a window between process-start and when the child gets the accept languages value where we might miss a pref change. I'm sure we could design something to avoid any holes like this, but the simple version I have here should work and be easy to maintain, even if it uses a little extra CPU in the prealloc phase.
Pushed by rjesup@wgate.com: https://hg.mozilla.org/integration/autoland/rev/e7187a1150ae do SetAcceptLanguages during process preallocation to reduce first-use overhead (especially for process-switch) r=dragana,necko-reviewers
Comment 6•3 years ago
|
||
Backed out for causing build bustages in nsHttpHandler
Backout link: https://hg.mozilla.org/integration/autoland/rev/109922bd00ad29feaefa745b46aa580af471300e
Pushed by rjesup@wgate.com: https://hg.mozilla.org/integration/autoland/rev/05c26697326a do SetAcceptLanguages during process preallocation to reduce first-use overhead (especially for process-switch) r=dragana,necko-reviewers
Comment 8•3 years ago
|
||
Backed out changeset 05c26697326a (bug 1710671) for multiple failures in obj-build/dist/include/mozilla/AlreadyAddRefed.h. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer?job_id=339508548&repo=autoland&lineNumber=2360
Push with failures:
https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=05c26697326ad1d69b71e23edc87c11f3b65481b
Backout:
https://hg.mozilla.org/integration/autoland/rev/95d93c007301f5a90edf1e8f79641f7c7569ba68
Pushed by rjesup@wgate.com: https://hg.mozilla.org/integration/autoland/rev/b470431a9538 do SetAcceptLanguages during process preallocation to reduce first-use overhead (especially for process-switch) r=dragana,necko-reviewers
Comment 10•3 years ago
|
||
bugherder |
Assignee | ||
Updated•5 months ago
|
Description
•