Closed
Bug 1654576
Opened 4 years ago
Closed 4 years ago
Ordering of the data members in nsPresContext results in wasted space
Categories
(Core :: Layout, task)
Core
Layout
Tracking
()
RESOLVED
FIXED
81 Branch
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
Details
Attachments
(1 file)
The fields in nsPresContext are somewhat disorderly, with the result that alignment requirements cause a bunch of extra padding to be included, and the object is bigger than it needs to be. By rearranging some declarations, we can noticeably reduce its size.
(It doesn't appear to me as though things have been deliberately ordered for efficient access or anything like that; looks more like just ad hoc growth.)
Assignee | ||
Comment 1•4 years ago
|
||
This reduces sizeof(nsPresContext) in my (opt) build on macOS from 568 to 544 bytes.
Depends on D84541
Updated•4 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1a45e9ea3c10 Reorder data members in nsPresContext for more efficient packing. r=emilio
Comment 3•4 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox81:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•