Last Comment Bug 800187 - Add memory reporter for the nsStyleSheetService
: Add memory reporter for the nsStyleSheetService
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla19
Assigned To: Nicholas Nethercote [:njn]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-10 16:38 PDT by Nicholas Nethercote [:njn]
Modified: 2012-10-16 01:29 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Add memory reporter for the nsStyleSheetService. (8.49 KB, patch)
2012-10-10 16:38 PDT, Nicholas Nethercote [:njn]
bzbarsky: review+
Details | Diff | Review

Description Nicholas Nethercote [:njn] 2012-10-10 16:38:06 PDT
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.
Comment 1 Nicholas Nethercote [:njn] 2012-10-10 16:38:46 PDT
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.
Comment 2 Nicholas Nethercote [:njn] 2012-10-10 16:39:45 PDT
I forgot to mention:  I modified nsLayoutStylesheetCache's reporter a little bit to make it consistent with the new reporter.
Comment 3 Boris Zbarsky [:bz] 2012-10-10 18:36:50 PDT
Note that with extensions like Stylish this number can be a lot bigger.
Comment 4 Andrew McCreight [:mccr8] 2012-10-10 19:06:52 PDT
Bug 713216 shows a case with high heap-unclassified with stylish.
Comment 5 Boris Zbarsky [:bz] 2012-10-10 19:11:43 PDT
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.
Comment 6 Nicholas Nethercote [:njn] 2012-10-10 20:39:05 PDT
> 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...
Comment 7 Gabor Krizsanits [:krizsa :gabor] 2012-10-12 04:21:39 PDT
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?
Comment 8 Nicholas Nethercote [:njn] 2012-10-12 13:56:55 PDT
> 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.

Note You need to log in before you can comment on or make changes to this bug.