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

Create presentation-timestamps explainer #106

Merged
merged 4 commits into from
Nov 11, 2024
Merged

Create presentation-timestamps explainer #106

merged 4 commits into from
Nov 11, 2024

Conversation

noamr
Copy link
Contributor

@noamr noamr commented Nov 11, 2024

Creating an explainer to help with TAG and other reviews.

@noamr noamr requested a review from clelland November 11, 2024 14:03
Copy link
Contributor

@clelland clelland left a comment

Choose a reason for hiding this comment

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

This document seems to imply that Chromium should start tracking the timing of the end of "update the rendering". Do you also expect that Chromium should change the times reported in existing attributes to match that, or should we update those specs to declare that the renderTime / startTime attributes refer to these new timestamps instead?

When originally introduced, paint timing ("`first-paint`" and "`first-contentful-paint`") aspired to represent an important moment in terms of user experience - "The pixels on the screen" representing a certain state.
However, this is tricky in terms of interopability - that moment is not always measured in the same way, and is not part of the flow of operations covered by web standards.
Originally in the paint-timing spec, a different time is used instead as the `startTime` - the end of the "update the rendering" phase, where the document is done setting up the rendering and hands over rendering to the user agent.
This is confusing and non-interoperable, as Chromium still reports the VSync-time, which sufficiently to corresponds to "pixels on the screen".
Copy link
Contributor

Choose a reason for hiding this comment

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

There's an extra "to" here -- I think either "sufficiently corresponds to" or "corresponds sufficiently to" is intended

## Overview
When originally introduced, paint timing ("`first-paint`" and "`first-contentful-paint`") aspired to represent an important moment in terms of user experience - "The pixels on the screen" representing a certain state.
However, this is tricky in terms of interopability - that moment is not always measured in the same way, and is not part of the flow of operations covered by web standards.
Originally in the paint-timing spec, a different time is used instead as the `startTime` - the end of the "update the rendering" phase, where the document is done setting up the rendering and hands over rendering to the user agent.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is still the case - we call "mark paint timing" from HTML, which sets a time for FP, FCP, LCP and ET. Is only LoAF which is different?

Also, can this link to the HTML spec?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

- `first-contentful-paint`
- `long-animation-frame`

It would the following shape:
Copy link
Contributor

Choose a reason for hiding this comment

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

"It would have the following shape:"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


## Conclusion

When exposing paint timings, we look for the right trade-off between "UX-percise" and "interoperable".
Copy link
Contributor

Choose a reason for hiding this comment

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

"precise"

presentation-timestamps.md Show resolved Hide resolved
@noamr
Copy link
Contributor Author

noamr commented Nov 11, 2024

This document seems to imply that Chromium should start tracking the timing of the end of "update the rendering". Do you also expect that Chromium should change the times reported in existing attributes to match that, or should we update those specs to declare that the renderTime / startTime attributes refer to these new timestamps instead?

Oops I'll add that to the explainer. The existing timings return presentationTime, but default to paintTime if that is not present.

Copy link
Contributor Author

@noamr noamr left a comment

Choose a reason for hiding this comment

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

Thanks @clelland, comments addressed.

presentation-timestamps.md Show resolved Hide resolved
Copy link
Contributor

@clelland clelland left a comment

Choose a reason for hiding this comment

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

Thanks! This looks like a good starting point for discussion

@noamr
Copy link
Contributor Author

noamr commented Nov 11, 2024

Thanks! This looks like a good starting point for discussion

It's actually already the result of the discussion on the WebPerfWG (#62)

@noamr noamr merged commit 52d10fc into main Nov 11, 2024
2 checks passed
github-actions bot added a commit that referenced this pull request Nov 11, 2024
SHA: 52d10fc
Reason: push, by noamr

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@noamr noamr deleted the noamr-patch-2 branch November 11, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants