Add memory reporter for the nsStyleSheetService

RESOLVED FIXED in mozilla19

Status

()

Core
CSS Parsing and Computation
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

unspecified
mozilla19
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
bz and I thought adding a memory reporter for the style-sheet service might
help with B2G dark matter, but it didn't much -- it's 6KB for desktop and 
~50KB for B2G on start-up.
(Assignee)

Comment 1

5 years ago
Created attachment 670179 [details] [diff] [review]
Add memory reporter for the nsStyleSheetService.

bz, does this look right?  I'll probably land this even though the amount is
so pathetic, just to make clear that we are measuring it.
Attachment #670179 - Flags: review?(bzbarsky)
(Assignee)

Comment 2

5 years ago
I forgot to mention:  I modified nsLayoutStylesheetCache's reporter a little bit to make it consistent with the new reporter.
Note that with extensions like Stylish this number can be a lot bigger.
Bug 713216 shows a case with high heap-unclassified with stylish.
Comment on attachment 670179 [details] [diff] [review]
Add memory reporter for the nsStyleSheetService.

Do we not need to delete or release mReporter?  If so, r=me, though I'd like to understand why we don't need to.
Attachment #670179 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 6

5 years ago
> Do we not need to delete or release mReporter?

We don't, because it gets put into an nsCOMArray that does the addref/release.  It's certainly not obvious, though...
There is a little race between this patch and Bug 676054 which adds another sheet type to nsStyleSheetService (one more array to count with...). Do you want to land this patch first and let me update my patch? Or shall I commit first?
(Assignee)

Comment 8

5 years ago
> Or shall I commit first?

It's Saturday here, and I won't land my patch until Monday.  So if you're ready to go now, please do and I'll update.
(Assignee)

Comment 9

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d58328861bf3
https://hg.mozilla.org/integration/mozilla-inbound/rev/ea223d8ba0f0
https://hg.mozilla.org/mozilla-central/rev/d58328861bf3
https://hg.mozilla.org/mozilla-central/rev/ea223d8ba0f0
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.