Re: [webrtc-rtptransport] API creates per-packet temporary objects, this is not ideal for GC (#77)

> These days the high end is more likely 1440p@120fps

So up to 16000 packets per second for high end, which would result in...
- 16000 RTCRtpPacket objects and 16000 Promise<RTCRtpSendResult> objects.
- Up to 16000 event callbacks, now it's possible we add some sort of [batching](https://github.com/w3c/webrtc-rtptransport/issues/78) for that, but each event firing would necessarily contain an `Event` object.
- The (up to) 16000 event callbacks and those 16000 promises being `await`'d would surely lead to a lot of context switching too which has been bad in prior experiments.
- Ballpark figure 32000-48000 objects/s, excluding anything the app is doing in response to these things.

Internally most of these operations would involve the UA doing a number of `PostTask` operations too, which again has some overhead on the threading side.

-- 
GitHub Notification of comment by henbos
Please view or discuss this issue at https://github.com/w3c/webrtc-rtptransport/issues/77#issuecomment-2425845943 using your GitHub account


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

Received on Monday, 21 October 2024 07:30:38 UTC