Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LargestContentfulPaint] Replace responseEnd with loadTime #17945

Merged
merged 1 commit into from Jul 23, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jul 19, 2019

This CL replaces responseEnd with loadTime. Before, responseEnd would be
used and would be problematic for memory cached images. We change it to
loadTime, the time at which LayoutObject::ImageNotifyFinished is called.
This time has the advantage of being independent of the memory cache and
being after the image has been appended to the DOM, as shown by a test.

To implement loadTime, we use a new HashMap. This HashMap populates the
timestamps that will be used in ImageRecords. We cannot use the existing
data structures because this happens before we know whether the image
will be added to the set of visible or invisible images, etc.

Bug: 982046, 965505
Change-Id: I50d4f304a35b60409c58c54a5bd912e7d15825e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1710682
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680096}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1710682 branch 4 times, most recently from 86a8ff5 to 2abc90c Compare July 23, 2019 17:55
This CL replaces responseEnd with loadTime. Before, responseEnd would be
used and would be problematic for memory cached images. We change it to
loadTime, the time at which LayoutObject::ImageNotifyFinished is called.
This time has the advantage of being independent of the memory cache and
being after the image has been appended to the DOM, as shown by a test.

To implement loadTime, we use a new HashMap. This HashMap populates the
timestamps that will be used in ImageRecords. We cannot use the existing
data structures because this happens before we know whether the image
will be added to the set of visible or invisible images, etc.

Bug: 982046, 965505
Change-Id: I50d4f304a35b60409c58c54a5bd912e7d15825e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1710682
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680096}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants