[PE] Remove GetDocument() calls from a frequently used PaintInvalidator func.
This patch removes GetDocument() call which loads a large object into memory for every PaintInvalidator::InvalidatePaint call on a LayoutObject. Instead, it stores this value on the paint invalidator and updates it whwnever we encounter a new LocalFrameView during the prepaint walk. On small dom / small invalidation this only has a small benefit, but for complicated dom, my local perf tests show large improvements. R=chrishtr@chromium.org Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I51139b8f8a802d608b583656d0be8bd2b7f13022 Reviewed-on: https://chromium-review.googlesource.com/924277Reviewed-by:Chris Harrelson <chrishtr@chromium.org> Commit-Queue: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#537414}
Showing
Please register or sign in to comment