Track the sizes of commonly used node types also in 32 bit builds

RESOLVED FIXED in Firefox 65

Status

()

enhancement
RESOLVED FIXED
8 months ago
4 months ago

People

(Reporter: smaug, Assigned: smaug)

Tracking

unspecified
mozilla65
Points:
---

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(1 attachment)

I need some more bits on nsINode, but better to ensure we don't increase the sizes of commonly used node types accidentally.

EXTRA_DOM_NODE_BYTES is 8 even on 32bit just to be safe with different alignments.
It affects anyhow only debug builds.


Right now on 64bit nsINode has 4 bytes for use without any change to sizes.
On 32bit if one wants 4 bytes on Element, mAttrs need to move from FragmentOrElement to Element (which makes sense anyhow). That way alignment is
better and 4 bytes on nsINode can be used for flags and still keeping Element size <= 80.
But Text is trickiest. It is using 64 bytes on 32bit. But then, Text nodes don't use mChildCount or mFirstChild for anything.


https://treeherder.mozilla.org/#/jobs?repo=try&revision=6a8ba68490e7d63d6a9c9168e61cd8435d4b8d63
Duplicate of this bug: 1508084
Attachment #9025898 - Flags: review?(ehsan) → review+
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9cdaafe18302
Track the sizes of commonly used node types also in 32 bit builds, r=ehsan
https://hg.mozilla.org/mozilla-central/rev/9cdaafe18302
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.