Open VeskeR opened 1 week ago
ok, upon further investigation it seems that even though cipher.decrypt
might not be a problem here, the vcdiff
decoding depends on the previous recevied payload in enable to be able to decode the next one (see code), so the intended way to use decode
function is to call it sequentially for each received message data and wait for a result.
I think we're not going to parallelize the decode
calls, but it is a good idea to add corresponding comments in the code explaining that decode
is intended to be called sequentially
@owenpearson ^
See discussion in PR comments.
When decoding regular/presence (and state in future) messages we end up calling cipher.decrypt, which based on our current documentation only supports AES algorithm in CBC mode. Presumably, decryption for AES in CBC mode can be parallelized, so we may be able to improve those decoding calls using
await Promise.all
instead of doing them sequantially.┆Issue is synchronized with this Jira Task by Unito