Re: [mediacapture-screen-share] Conditional Focus (When Display-Capture Starts) (#190)

Let's measure! https://jsfiddle.net/jib1/y1e4rg0d/ (Firefox result on a 2019 MBP, other browsers are similar 3K-4K)
```
tasks / setTimeout = 4655
tasks / ms = 45.64
```
Transient activation in all browsers I tested: https://jsfiddle.net/jib1/zqxnu9t5/ : >4 seconds (or >182,560 tasks)

So according to browsers, >4 seconds is when a user stops associating a reaction with their action.

So from a security perspective, we're fine by several orders of magnitude. From a general UX snappiness perspective, we're also fine by an order of magnitude.

> The more we call web app JS, the more delay there is

That's a quantitative claim of linearity I don't think holds or is helpful. By that rationale, tightening our purse strings on tasks should improve performance. But it doesn't. A single microtask can wait forever. It's nonlinear. I don't think there can be any inherent correlation between an amount of work being done and the number of tasks queued. It would depend entirely on how an application is structured.

This seems like a nonissue to me.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/190#issuecomment-929580200 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 28 September 2021 20:00:35 UTC