Closed Bug 1397472 Opened 7 years ago Closed 7 years ago

stylo: Add a memory reporter for ElementData

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

53 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: bzbarsky, Assigned: n.nethercote)

References

Details

Attachments

(1 file)

Element::AddSizeOfExcludingThis never actually measures the ElementData.  Neither does the Servo_Element_SizeOfExcludingThisAndCVs function it calls: that measures some of the things the ElementData stores, but not the ElementData itself.

We should add this measurement.  It can be somewhat significant (e.g. > 5MB on the HTML single-page spec).
Assignee: nobody → n.nethercote
Priority: -- → P3
Flags: needinfo?(n.nethercote)
We already measure (in Rust code) the things hanging off it, but overlooked the
object itself. This patch adds measurement on the C++ side.
bz: one line review! :)
Flags: needinfo?(n.nethercote) → needinfo?(bzbarsky)
Comment on attachment 8905771 [details] [diff] [review]
Measure ElementData

Review of attachment 8905771 [details] [diff] [review]:
-----------------------------------------------------------------

r+. Feel free to delay landing the servo patch until you have some other reason to land something there, since it's just a comment.
Attachment #8905771 - Flags: review+
At bz's suggestion, I ended up putting this in a new bucket "layout/servo-element-data-objects" instead of lumping it in under DOM nodes. For the single-page HTML5 spec I got 3.4 MiB in that bucket.
Flags: needinfo?(bzbarsky)
https://hg.mozilla.org/mozilla-central/rev/8f53032e5451
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.