stylo: Add a memory reporter for ElementData

RESOLVED FIXED in Firefox 57

Status

()

enhancement
P3
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: bzbarsky, Assigned: njn)

Tracking

53 Branch
mozilla57
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment)

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)
Assignee

Comment 1

2 years ago
We already measure (in Rust code) the things hanging off it, but overlooked the
object itself. This patch adds measurement on the C++ side.
Assignee

Comment 2

2 years ago
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+
Assignee

Comment 6

2 years ago
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: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.