Closed Bug 800187 Opened 12 years ago Closed 12 years ago

Add memory reporter for the nsStyleSheetService

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(1 file)

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.
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)
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+
> 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?
> 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.
https://hg.mozilla.org/mozilla-central/rev/d58328861bf3
https://hg.mozilla.org/mozilla-central/rev/ea223d8ba0f0
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: