Skip to content

What is the scope of timings? #31

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

Closed
domenic opened this issue Aug 16, 2018 · 7 comments
Closed

What is the scope of timings? #31

domenic opened this issue Aug 16, 2018 · 7 comments

Comments

@domenic
Copy link

domenic commented Aug 16, 2018

As of whatwg/html#3923, the HTML event loop calls "mark paint timings" giving it a Document object.

But the spec at https://w3c.github.io/paint-timing/ isn't very clear about how things are scoped. It should probably use the Document argument to make more precise statements like "If this instance of update the rendering is the first contentful paint", and to say in which realm to "Create a new PerformancePaintTiming object"

This problem extends to the called https://w3c.github.io/performance-timeline/#dfn-queue-a-performanceentry spec as well; it's not clear what "For each registered performance observer" means. It could mean any PerformanceObserver objects from any Document at all, or just the Document ones, or the same-origin Document ones...

@yoavweiss
Copy link
Contributor

@tdresser / @npm1 - Does this require further discussion? Or is this just work that needs to happen?

@npm1
Copy link
Contributor

npm1 commented Oct 17, 2018

I think just work that needs to happen? But I agree that the spec is confusing... and I'm not sure what the correct wording is. It says "Each ECMAScript global environment has[...] a list of registered performance observer objects that is initially empty", so we need to tie that with the concept of marking paint timing for a Document.

@yoavweiss
Copy link
Contributor

But the spec at https://w3c.github.io/paint-timing/ isn't very clear about how things are scoped. It should probably use the Document argument to make more precise statements like "If this instance of update the rendering is the first contentful paint", and to say in which realm to "Create a new PerformancePaintTiming object"

I believe these issues are addressed in the current spec language.
@domenic - can you confirm?

This problem extends to the called https://w3c.github.io/performance-timeline/#dfn-queue-a-performanceentry spec as well; it's not clear what "For each registered performance observer" means. It could mean any PerformanceObserver objects from any Document at all, or just the Document ones, or the same-origin Document ones...

Do I understand correctly that you'd like us to modify "queue a PerformanceEntry" to also receive a document and handle observer registrations off of that? If so, seems like we should open that as an issue on PerformanceTimeline

@domenic
Copy link
Author

domenic commented Mar 24, 2020

I believe these issues are addressed in the current spec language. @domenic - can you confirm?

It's mostly fixed. One minor remaining issue is the sentences of the form "If this instance of update the rendering is the first paint of document". First paint is not properly defined on a per-Document basis. In fact it seems to not be defined; only "first paint entry" is defined, which is confusing.

Do I understand correctly that you'd like us to modify "queue a PerformanceEntry" to also receive a document and handle observer registrations off of that? If so, seems like we should open that as an issue on PerformanceTimeline

This looks to have been improved as well. In particular it smuggles in the global object pointer by consulting newEntry's relevant global object, and then it uses that to create all the objects in question. So this seems good to go.

@npm1
Copy link
Contributor

npm1 commented Mar 24, 2020

It's mostly fixed. One minor remaining issue is the sentences of the form "If this instance of update the rendering is the first paint of document". First paint is not properly defined on a per-Document basis. In fact it seems to not be defined; only "first paint entry" is defined, which is confusing.

Yep, this is related to what I mentioned in #38.

This looks to have been improved as well. In particular it smuggles in the global object pointer by consulting newEntry's relevant global object, and then it uses that to create all the objects in question. So this seems good to go.

I'm a smuggler :D this is fixed in Paint Timing and I'm tracking others in w3c/performance-timeline#162.

@yoavweiss
Copy link
Contributor

It's mostly fixed. One minor remaining issue is the sentences of the form "If this instance of update the rendering is the first paint of document". First paint is not properly defined on a per-Document basis. In fact it seems to not be defined; only "first paint entry" is defined, which is confusing.

Yep, this is related to what I mentioned in #38.

Yeah, it seems like whatever will solve #38 will also resolve this.

@yoavweiss
Copy link
Contributor

I believe this is closed by #82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants