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•4 years ago
|
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 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.
Comment 6•4 years ago
|
||
Backed out for causing build bustages in nsHttpHandler
Backout link: https://hg.mozilla.org/integration/autoland/rev/109922bd00ad29feaefa745b46aa580af471300e
Comment 8•4 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
Comment 10•4 years ago
|
||
bugherder |
Assignee | ||
Updated•9 months ago
|
Description
•