Re: [mediacapture-transform] Out-of-main-thread processing by default (#23)

> The option of using w3c/mediacapture-extensions#16 also would allow getting access on the main thread.

It'd let us limit new MST access methods to workers, so users have to transfer them to a worker to do such processing.

> I don't think allowing access on the main thread is such a dangerous thing that should be forbidden at all costs,

I think it's [generally understood](https://web.dev/mainthread-work-breakdown/) that the [main-thread is overworked and underpaid](https://web.dev/mainthread-work-breakdown/). It's a particularly poor environment for realtime (low-latency) processing due to the open-ended number of tasks that may be queued on it at certain times, which can lead to ms delays even to get _on_ it. This is why _"The main-thread is completely unpredictable"_. Newer devices have increasingly tighter FPS deadlines to meet, so we should design something that cannot meet it reliably.

> especially if the result is a much more complex API

I don't see how it would be. Worst-case, streams can be transferred from workers to main-thread, no worse than what was proposed the other direction.

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


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

Received on Monday, 10 May 2021 15:05:29 UTC