Closed Bug 1371958 Opened 2 years ago Closed 2 years ago

FrameLayerBuilder does unnecessary hashtable lookups

Categories

(Core :: Web Painting, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: mats, Assigned: mats)

References

Details

(Keywords: perf)

Attachments

(2 files)

No description provided.
Oh, looks like FrameLayerBuilder::ComputeGeometryChangeForItem is also doing unnecessary hashtable lookups...
Summary: ContainerState::AttemptToRecyclePaintedLayer does an unnecessary hashtable lookup → FrameLayerBuilder does unnecessary hashtable lookups
Comment on attachment 8876445 [details] [diff] [review]
part 2 - Move a mPaintedLayerItems.GetEntry() call into the else-branch where its result is actually used to avoid an unnecessary hashtable lookup when we don't take the else-branch

Review of attachment 8876445 [details] [diff] [review]:
-----------------------------------------------------------------

I *think* the intervening calls between the points that got changed wouldn't add entries to the hashtable such that we change behavior here, but that should really be verifiabled by a module peer.
Attachment #8876445 - Flags: review?(nfroyd) → review?(matt.woodrow)
Attachment #8876445 - Flags: review?(matt.woodrow) → review+
Attachment #8876444 - Flags: review?(nfroyd) → review+
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/888cb6362ed8
part 1 - Use EnsureRemoved instead of Contains+RemoveEntry to avoid an unnecessary hashtable lookup.  r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/59b1fd575d3d
part 2 - Move a mPaintedLayerItems.GetEntry() call into the else-branch where its result is actually used to avoid an unnecessary hashtable lookup when we don't take the else-branch.  r=froydnj
https://hg.mozilla.org/mozilla-central/rev/888cb6362ed8
https://hg.mozilla.org/mozilla-central/rev/59b1fd575d3d
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.