LazyLoad: Record VisibleLoadTime metrics after the image becomes visible
Before this CL, the VisibleLoadTime metrics for image elements are recorded when the image finishes loading. This means that: (a) Images that finish loading before the image element's visibility observer triggers for the first time will have their VisibleLoadTime recorded as being below-the-fold, even if the image is actually above-the-fold, (b) When automatic lazyloading is disabled, VisibleLoadTime samples will be recorded for images that finish loading even if the viewport is never scrolled near the image, meaning that many more samples will be recorded than when automatic lazyloading is enabled. To solve this, this CL changes VisibleLoadTime for images to be recorded after the image becomes visible, instead of being recorded when the image finishes loading. This also makes the metric consistent with how VisibleLoadTime is recorded for frames. Bug: 1010761 Change-Id: I2d89d413df1d49a2aa0d8974fcc188d86e0e6d92 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1870109Reviewed-by:rajendrant <rajendrant@chromium.org> Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Scott Little <sclittle@chromium.org> Cr-Commit-Position: refs/heads/master@{#708267}
Showing
This diff is collapsed.
Please register or sign in to comment