Closed
Bug 1126681
Opened 10 years ago
Closed 2 years ago
Pre-create/initialize nsFrameLoader and TabParent once preallocated process is ready (~10ms)
Categories
(Core :: DOM: Content Processes, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: ting, Unassigned)
References
Details
As a nsFrameLoader and a TabParent are required whenever an application is launched, we can precreate them and initialize BrowserElementParent once preallocated process is ready.
Based on the profile at bug 1110624 comment 6, this can save us ~20ms from avoiding TryRemoteBrowser() and 'remote-brownser-pending' notification in nsFrmaeLoader::ReallyStartLoadingInternal().
Note: I was thinking to pre-create an iframe from system app (bug 939695), but TabContext can't be updated once it is initialized, so probably doing this in Gecko is better.
Reporter | ||
Comment 1•10 years ago
|
||
I just realized 'remote-browser-pending' is for nsGenericHTMLFrameElement, it can't be done while pre-creating nsFrameLoader when preallocated process is ready.
Reporter | ||
Comment 2•10 years ago
|
||
Without doing 'remote-browser-pending' to initialize browser element API earlier, we can save only ~10ms.
Summary: Pre-create/initialize nsFrameLoader and TabParent once preallocated process is ready (~20ms) → Pre-create/initialize nsFrameLoader and TabParent once preallocated process is ready (~10ms)
Reporter | ||
Comment 3•10 years ago
|
||
Kanru just reminded me that we can still initialize the browser element API and set frame loader before creating an iframe, remote-brwoser-pending is notified before TryRemoteBrowser() is because we want to make sure the hello from child process will be received.
Reporter | ||
Comment 4•10 years ago
|
||
Actually remote-browser-pending is not necessary, frame loader can call nsBrowserElement::InitBrowserElementAPI() directly.
Reporter | ||
Comment 5•10 years ago
|
||
(In reply to Ting-Yu Chou [:ting] from comment #3)
> Kanru just reminded me that we can still initialize the browser element API
> and set frame loader before creating an iframe, remote-brwoser-pending is
> notified before TryRemoteBrowser() is because we want to make sure the hello
> from child process will be received.
I am not sure is this true. BrowserElementParent gets message manager from the frame loader to add listeners, but seems nsFrameLoader::EnsureMessageManager() needs owner element to behave correctly.
Reporter | ||
Updated•10 years ago
|
Comment 6•10 years ago
|
||
FYI, I'm likely to implement swapping TabParent or re-initialize nsFrameLoader for session restore (bug 1033999) and process isolation (bug 1170894)
Comment 7•2 years ago
|
||
BrowserElementParent is going away in bug 1770944
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•