[webrtc-rtptransport] Per-packet notifications are mandatory, this is not ideal for context switching (#78)

henbos has just created a new issue for https://github.com/w3c/webrtc-rtptransport:

== Per-packet notifications are mandatory, this is not ideal for context switching ==
While I don't have data for this, I am under the impression that callbacks into JavaScript has some amount of overhead inherent that is not insignificant (@tonyherre @handellm @eshr do you know?), so I get a bit worried when I see...
```
interface RTCRtpTransport {
    attribute EventHandler onpacketizedrtpavailable;
    attribute EventHandler onsentrtp;
    attribute EventHandler onreceivedrtpacks;
    ...
};

interface RTCRtpSendStream {
    attribute EventHandler onpacketizedrtp;
    ...
};
```

IIUC we'll potentially have thousands of event handlers (or callbacks if #70 is resolved, but that would not change the frequency).

Do these things lend themselves easily to User Agent batching on behalf of the app (e.g. firing all callbacks in the same task execution cycle), or should the app say when it is subscribing what the batch frequency should be? Whether we need to change the API or not I think we must say what MUST happen here

Please view or discuss this issue at https://github.com/w3c/webrtc-rtptransport/issues/78 using your GitHub account


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

Received on Monday, 7 October 2024 12:08:57 UTC