Closed Bug 1221842 Opened 7 years ago Closed 7 years ago
Don't reallocate display item geometry if nothing changed
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)
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+
Does this work with nsImageGeometryMixin where we update the draw result sometimes but don't mark anything as invalid?
ni for comment 2
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
(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.
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.