Closed
Bug 1350734
Opened 8 years ago
Closed 8 years ago
Load xul.css lazily in the content process
Categories
(Core :: Layout, enhancement)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: jwatt)
References
Details
Attachments
(1 file, 1 obsolete file)
1.94 KB,
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
nsDocumentViewer::CreateStyleSet() takes 11ms in this profile: <https://perfht.ml/2nq6PxV> It seems like we should be able to get away with loading xul.css lazily in the content process, since unless you use video controls or the like xul-minimal.css should be enough.
Bug 1008455 did some of the work needed but not enough. This logic needs to be made parent only: <http://searchfox.org/mozilla-central/rev/7419b368156a6efa24777b21b0e5706be89a9c2f/layout/style/nsLayoutStylesheetCache.cpp#341>
![]() |
Assignee | |
Updated•8 years ago
|
Assignee: nobody → jwatt
![]() |
Assignee | |
Comment 1•8 years ago
|
||
(In reply to :Ehsan Akhgari (busy) from comment #0)
> Bug 1008455 did some of the work needed but not enough.
Well, it avoided any unnecessary per-document work to process xul.css rules, and back then there was no reason to avoid the once-per-process overhead of creating the cached xul.css sheet since we knew we were going to need that to display the UI. ;)
But yeah, nowadays we should avoid this for the content process to speed up tab opening when opening a tab requires us to start a new content process.
![]() |
Assignee | |
Comment 2•8 years ago
|
||
Attachment #8851545 -
Flags: review?(cam)
![]() |
Assignee | |
Comment 3•8 years ago
|
||
Attachment #8851545 -
Attachment is obsolete: true
Attachment #8851545 -
Flags: review?(cam)
Attachment #8851547 -
Flags: review?(cam)
Comment 4•8 years ago
|
||
Comment on attachment 8851547 [details] [diff] [review]
patch
Review of attachment 8851547 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/style/nsLayoutStylesheetCache.cpp
@@ +150,5 @@
> + if (!mXULSheet) {
> + LoadSheetURL("chrome://global/content/xul.css",
> + &mXULSheet, eAgentSheetFeatures, eCrash);
> + }
> +
Nit: Trailing space.
@@ +344,5 @@
> LoadSheetURL("resource://gre/res/svg.css",
> &mSVGSheet, eAgentSheetFeatures, eCrash);
> + if (XRE_IsParentProcess()) {
> + // We know we need this for the UI
> + LoadSheetURL("chrome://global/content/xul.css",
Just call XULSheet().
Attachment #8851547 -
Flags: review?(cam) → review+
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8000f47b7399
Have nsLayoutStylesheetCache load xul.css lazily in the content process. r=heycam
Comment 6•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•