Closed
Bug 1221842
Opened 9 years ago
Closed 9 years ago
Don't reallocate display item geometry if nothing changed
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla47
People
(Reporter: mattwoodrow, Assigned: mattwoodrow)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
6.02 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Currently we always allocate a new nsDisplayItemGeometry when processing a display item, even if nothing actually changed.
If the invalidation region is empty, then nothing has changed, so we can just reuse the old geometry and make life easier for the memory allocator.
Attachment #8683423 -
Flags: review?(roc)
Assignee | ||
Comment 1•9 years ago
|
||
We could take this a step further, and update existing geometry in-place when there are changes, but this is a rarer common case and a lot more work.
Attachment #8683423 -
Flags: review?(roc) → review+
Comment 2•9 years ago
|
||
Does this work with nsImageGeometryMixin where we update the draw result sometimes but don't mark anything as invalid?
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e8b7b5321acddf4316dacfd521400fcef9c3ce7b
Backed out changeset b456daa0503f (bug 1221842) for B2G ICS Emulator Opt R7 bustage on a CLOSED TREE
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Timothy Nikkel (:tn) from comment #2)
> Does this work with nsImageGeometryMixin where we update the draw result
> sometimes but don't mark anything as invalid?
Yeah, I believe this is fine.
We update the draw result on the stored geometry object, it shouldn't matter if this got freshly allocated during DLBI or was retained from the previous cycle.
Flags: needinfo?(matt.woodrow)
Comment 8•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Updated•9 years ago
|
Target Milestone: mozilla46 → mozilla47
Comment 9•9 years ago
|
||
This resulted in another nice improvement in the tp5o_scroll Talos benchmark:
https://treeherder.mozilla.org/perf.html#/alerts?id=2014&framework=1&hideImprovements=0
You need to log in
before you can comment on or make changes to this bug.
Description
•