- From: Tony Herre via GitHub <sysbot+gh@w3.org>
- Date: Fri, 31 May 2024 09:17:34 +0000
- To: public-webrtc@w3.org
tonyherre has just created a new issue for https://github.com/w3c/webrtc-rtptransport: == BYOB interfaces to avoid ArrayBuffer churn == Currently our APIs for reading out payload bytes & Header Extension bytes just pass an ArrayBuffer, but this requires new buffers to be allocated and GCed for every interaction, a cost which adds up at the frequencies & data volumes we're looking at. A bring-your-own-buffer approach would allow apps to maintain their own buffer pools, potentially even directly writing into a WASM memory block, thus avoiding another copy. WebCodecs has taken this approach with all interfaces have a `copyTo(AllowSharedBufferSource destination);` method - eg see https://www.w3.org/TR/webcodecs/#ref-for-dom-encodedaudiochunk-copyto. I suggest we follow this pattern for RTCRtpPacket.payload and RTCRtpHeaderExtension.value. Please view or discuss this issue at https://github.com/w3c/webrtc-rtptransport/issues/41 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 31 May 2024 09:17:35 UTC