mediasoup icon indicating copy to clipboard operation
mediasoup copied to clipboard

Do not use JSON for internal routing

Open jmillan opened this issue 2 years ago • 3 comments

JSON encoding/decoding is very CPU intensive.

Use character separated string for internal routing representation.

data info from node to worker for Channel remains being JSON. data info from node to worker for PayloadChannel is a now string to be decoded by the target:

  • At this moment only DataChannel ppid is used as data, and we are NOT sending it as JSON but as plain string.

jmillan avatar Jul 20 '22 09:07 jmillan

Canceling Rust GH actions because that changes are missing.

jmillan avatar Jul 20 '22 09:07 jmillan

What you think about replacing json by protobuf? This way we can save CPU/RAM and generate types for typescript/c++/rust.

Hartigan avatar Jul 25 '22 08:07 Hartigan

We are completely removing any data structure for internal.

Data structures for data will be reviewed afterwards.

jmillan avatar Jul 25 '22 08:07 jmillan

Closing in favor of https://github.com/versatica/mediasoup/pull/893

ibc avatar Aug 23 '22 17:08 ibc