Closed
Bug 1219352
Opened 9 years ago
Closed 8 years ago
Clean up fields in FrameMetrics
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
mozilla46
People
(Reporter: kats, Assigned: kats)
Details
(Whiteboard: [gfx-noted])
Attachments
(3 files)
The FrameMetrics class has grown over time and gotten a bit messy. In particular there are a number of bool fields which could probably be packed together better. We should do that since we use FrameMetrics quite a bit and it's worth spending a bit of time to make sure it's not taking up unnecessary amounts of space.
Updated•9 years ago
|
Whiteboard: [gfx-noted]
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bugmail.mozilla
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/29605/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/29605/
Attachment #8704275 -
Flags: review?(botond)
Assignee | ||
Comment 2•8 years ago
|
||
This patch: - Maintains a consistent ordering between the lists of fields in the FrameMetrics constructor, operator==, IPC read/write functions, and the actual order of fields in FrameMetrics. As part of this, missing default initializers are added to the FrameMetrics constructor, and fields omitted from the operator== are explicitly noted. - Moves all the boolean values to the end of the set of field (for better packing). - Moves the scroll id and parent scroll id to the front of the list, so that the operator== can fail faster in the common case. Review commit: https://reviewboard.mozilla.org/r/29607/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/29607/
Attachment #8704276 -
Flags: review?(botond)
Assignee | ||
Comment 3•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/29609/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/29609/
Attachment #8704277 -
Flags: review?(botond)
Assignee | ||
Comment 4•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8c2d8a3b2646
Updated•8 years ago
|
Attachment #8704275 -
Flags: review?(botond) → review+
Comment 5•8 years ago
|
||
Comment on attachment 8704275 [details] MozReview Request: Bug 1219352 - Update a couple of bool-setters to take a bool argument. r?botond https://reviewboard.mozilla.org/r/29605/#review26573
Updated•8 years ago
|
Attachment #8704276 -
Flags: review?(botond) → review+
Comment 6•8 years ago
|
||
Comment on attachment 8704276 [details] MozReview Request: Bug 1219352 - Rearrange fields in FrameMetrics. r?botond https://reviewboard.mozilla.org/r/29607/#review26579
Comment 7•8 years ago
|
||
Comment on attachment 8704277 [details] MozReview Request: Bug 1219352 - Pack the FrameMetrics booleans. r?botond https://reviewboard.mozilla.org/r/29609/#review26581 It looks like over the wire, the bools still take up sizeof(int) bytes. Assuming the intention of this patch wasn't to optimize that, this is fine.
Attachment #8704277 -
Flags: review?(botond) → review+
Assignee | ||
Comment 8•8 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #7) > It looks like over the wire, the bools still take up sizeof(int) bytes. > Assuming the intention of this patch wasn't to optimize that, this is fine. Good point - yes, the intention wasn't to optimize that since that's really transient memory and optimizing it is probably not worth it. For the record on OS X FrameMetrics was 304 bytes to start with and went down to 272 after the changes, if I'm remembering right. It was in the neighbourhood of a 10% improvement at any rate.
https://hg.mozilla.org/integration/mozilla-inbound/rev/d4cf012ac235 https://hg.mozilla.org/integration/mozilla-inbound/rev/23c55d10a219 https://hg.mozilla.org/integration/mozilla-inbound/rev/e9356c3b5e6f
Comment 10•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d4cf012ac235 https://hg.mozilla.org/mozilla-central/rev/23c55d10a219 https://hg.mozilla.org/mozilla-central/rev/e9356c3b5e6f
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in
before you can comment on or make changes to this bug.
Description
•