How far are we from shipping perf-violation-style reports?
What other violations are we planning to report? Is it just csp and hpkp for now?
Do we restrict these timings to be available only on passive listeners? Could we?
My main concern with us exposing this on non-passive regular input events is an increase in naieve RUM attempts that just add more listeners to the body ... because I think that's typically what peeps would do...
On Mon, Nov 16, 2015 at 11:36 AM, Nat Duca <nd...@google.com> wrote:Do we restrict these timings to be available only on passive listeners? Could we?We don't (we don't have passive listeners fully implemented yet). I'm not sure we really could - that would be bizarre if timeStamp was 0 or something for active listeners.
That is, even with your reply, I'm uneasy about even allowing latency calculation on non-passive events. They're coming, so why the rush? If we're rushed, go the perf observer route...
On Tue, Nov 17, 2015 at 10:03 AM, Nat Duca <nd...@google.com> wrote:That is, even with your reply, I'm uneasy about even allowing latency calculation on non-passive events. They're coming, so why the rush? If we're rushed, go the perf observer route...Just to make sure I understand the concern..- We go out and tell developers that input latency is a problem they should care about- To figure out _if_ it's a problem developers have to install new handlers to capture the event and timestamp it at the end-- they could define these handlers with the {passive: true} flag, but...--- if UA doesn't support this (yet) then the listener itself creates a perf problem--- once UA supports it, all is well.
Does that capture it?
Curious, do we have data on how many pages register for such events already? My hunch is that most pages will have at least one - courtesy of own code, analytics code, ads code, etc - and the impact of an additional handler will be near zero with respect to where they're at currently
On the other hand, this is also another good argument for starting with UA-initiated violation reports.. We can instrument things on our end without asking developers to add any additional handlers.
On Tue, Nov 17, 2015 at 2:43 PM, Ilya Grigorik <igri...@google.com> wrote:On Tue, Nov 17, 2015 at 10:03 AM, Nat Duca <nd...@google.com> wrote:That is, even with your reply, I'm uneasy about even allowing latency calculation on non-passive events. They're coming, so why the rush? If we're rushed, go the perf observer route...Just to make sure I understand the concern..- We go out and tell developers that input latency is a problem they should care about- To figure out _if_ it's a problem developers have to install new handlers to capture the event and timestamp it at the end-- they could define these handlers with the {passive: true} flag, but...--- if UA doesn't support this (yet) then the listener itself creates a perf problem--- once UA supports it, all is well.Assuming that they don't mess it up. If they mess it up, then they've made a perf problem.Does that capture it?Partly. The other thing is that we've been on a crusade for *years* to get people to *not* register these listeners. So now we're saying "now you should care about input latency, add a body touch/wheel AND mouse listener"
I don't know if we need to go so far as to UA violations.On the other hand, this is also another good argument for starting with UA-initiated violation reports.. We can instrument things on our end without asking developers to add any additional handlers.Why not for instance allow people to subscribe to input timing events via performance observer? Only. Off by default, on when you ask for it. Simple spec, easy spec. No footguns.
On Tue, Nov 17, 2015 at 3:33 PM, Nat Duca <nd...@google.com> wrote:On Tue, Nov 17, 2015 at 2:43 PM, Ilya Grigorik <igri...@google.com> wrote:On Tue, Nov 17, 2015 at 10:03 AM, Nat Duca <nd...@google.com> wrote:That is, even with your reply, I'm uneasy about even allowing latency calculation on non-passive events. They're coming, so why the rush? If we're rushed, go the perf observer route...Just to make sure I understand the concern..- We go out and tell developers that input latency is a problem they should care about- To figure out _if_ it's a problem developers have to install new handlers to capture the event and timestamp it at the end-- they could define these handlers with the {passive: true} flag, but...--- if UA doesn't support this (yet) then the listener itself creates a perf problem--- once UA supports it, all is well.Assuming that they don't mess it up. If they mess it up, then they've made a perf problem.Does that capture it?Partly. The other thing is that we've been on a crusade for *years* to get people to *not* register these listeners. So now we're saying "now you should care about input latency, add a body touch/wheel AND mouse listener"Well, at the limit I don't think our aim is to eliminate them, right? I'm still getting up to speed here, so I may be talking nonsense (wouldn't be the first time ;)), but my understanding is that the major step function happens when you add the first handler -- with that present we now have to synchronize between threads, etc. As such, any additional handlers are small incremental cost? That's not to say that we should encourage more of them, but at the same time if we accept that we'll have at least one then perhaps we're optimizing for the wrong thing?The other thing to discuss here is what exactly we're telling developers to measure... Scroll latency is a tidy case where all the instrumentation lives in the browser -- we can surface that via Perf Observer with nice properties. However, I don't think that's sufficient. We're telling developers to measure "response" at a much higher level: time from input event to some _meaningful response_ within the application. The only way to do this is for the application to capture the event it cares about (click, scroll, etc), execute own logic, and then emit a custom metric at the end (e.g. as it renders the response, triggers an animation, or some such). So, if I want to do "response RUM" I'd still want to register for these events..?
On Tue, Nov 17, 2015 at 3:33 PM, Nat Duca <nd...@google.com> wrote:On Tue, Nov 17, 2015 at 2:43 PM, Ilya Grigorik <igri...@google.com> wrote:On Tue, Nov 17, 2015 at 10:03 AM, Nat Duca <nd...@google.com> wrote:That is, even with your reply, I'm uneasy about even allowing latency calculation on non-passive events. They're coming, so why the rush? If we're rushed, go the perf observer route...
Just to make sure I understand the concern..- We go out and tell developers that input latency is a problem they should care about- To figure out _if_ it's a problem developers have to install new handlers to capture the event and timestamp it at the end-- they could define these handlers with the {passive: true} flag, but...--- if UA doesn't support this (yet) then the listener itself creates a perf problem--- once UA supports it, all is well.Assuming that they don't mess it up. If they mess it up, then they've made a perf problem.Does that capture it?Partly. The other thing is that we've been on a crusade for *years* to get people to *not* register these listeners. So now we're saying "now you should care about input latency, add a body touch/wheel AND mouse listener"Well, at the limit I don't think our aim is to eliminate them, right? I'm still getting up to speed here, so I may be talking nonsense (wouldn't be the first time ;)), but my understanding is that the major step function happens when you add the first handler -- with that present we now have to synchronize between threads, etc. As such, any additional handlers are small incremental cost? That's not to say that we should encourage more of them, but at the same time if we accept that we'll have at least one then perhaps we're optimizing for the wrong thing?
About the original question regarding high res timestamps. Is performance monitoring the only thing we want high res timestamps for? I thought you needed them in order to do good touchmove-based gestures (e.g. where you want to measure the velocity/acceleration of a fling). Am I wrong?