Closed ganeshrvel closed 1 month ago
Hello :)
a. Unfortunately, benchmarks are not present. You can consider the Protobuf serialization performance as a potential UI blocking factor.
b.
RustSignal
and DartSignal
both consist of a pair of Protobuf message binary and raw binary. You need to consider Protobuf serialization as a separate overhead factor. While copying raw binary from Dart to Rust, memory copy is unavoidable because Rust has an ownership system that cannot coexist with garbage-collected Dart objects.Operation and Data | Protobuf Overhead | Memory Copy Overhead | Details |
---|---|---|---|
Dart >> Rust (Message) | O | O | Deserializes from heap vector slice |
Dart >> Rust (Raw Binary) | X | O | Copies the heap vector slice |
Rust >> Dart (Message) | O | O | Deserializes from heap vector slice |
Rust >> Dart (Raw Binary) | X | X | Zero-copy ownership transfer |
Vec<u8>
.c.
Hi rinf team,
I stumbled on this project while looking for a way to use Rust in Flutter combination. Thanks for this amazing package. Great going.
I have a few questions though:
a. Do you have any existing benchmarks for rinf?
b. If I have hundreds of thousands of struct data (mostly metadata info) coming as a list from Rust to Dart, will there be a memory copy overhead?
c. Since Dart uses message ports to communicate, is there any noticeable delay or overhead observed?
Thanks