Closed
Bug 1350734
Opened 7 years ago
Closed 7 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)
(deleted),
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•7 years ago
|
Assignee: nobody → jwatt
Assignee | ||
Comment 1•7 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•7 years ago
|
||
Attachment #8851545 -
Flags: review?(cam)
Assignee | ||
Comment 3•7 years ago
|
||
Attachment #8851545 -
Attachment is obsolete: true
Attachment #8851545 -
Flags: review?(cam)
Attachment #8851547 -
Flags: review?(cam)
Comment 4•7 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•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8000f47b7399
Status: NEW → RESOLVED
Closed: 7 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
•