Page MenuHomePhabricator

[native] Use BlobUtils for media encryption/decryption
ClosedPublic

Authored by bartek on May 25 2023, 7:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 14, 3:47 AM
Unknown Object (File)
Sat, May 11, 9:50 PM
Unknown Object (File)
Wed, May 8, 2:33 PM
Unknown Object (File)
Mon, May 6, 12:34 PM
Unknown Object (File)
Sat, May 4, 10:32 AM
Unknown Object (File)
Wed, May 1, 10:33 PM
Unknown Object (File)
Fri, Apr 26, 9:53 AM
Unknown Object (File)
Wed, Apr 24, 8:47 PM
Subscribers

Details

Summary

This diff increases the performance of media encryption/decryption by using newly introduced methods instead
of basing on response.arrayBuffer() which uses slow base64 under the hood. Details are described in parent diffs and
in the task issue.

Depends on D7974

Test Plan

Ensured that media encryption/decryption still works as expected.
For these more curious, you can check performance using the following:

const startTime = Date.now();
// code from this diff here
console.log('Time:', Date.now() - startTime);

In my case, the time went down from hundreds of milliseconds to 1-2ms.

Diff Detail

Repository
rCOMM Comm
Branch
barthap/native-perf2
Lint
No Lint Coverage
Unit
No Test Coverage