ros2_rust icon indicating copy to clipboard operation
ros2_rust copied to clipboard

Optimize Serde implementations for rosidl_runtime_rs types

Open nnmm opened this issue 3 years ago • 0 comments

Particularly:

  • The String Deserialize implementation first creates a Rust String, but it could potentially directly construct a rosidl_runtime_rs::String. Same for WString and the sequences types (which use a temporary Vec).
  • The String Serialize implementation also creates a Rust String even though it wouldn't need to.

The sequence serialization implementations are already as efficient as they can be, I believe.

This is a tricky task that is best suited for someone who's quite familiar with the Serde data model, so I'm adding the needs-rust-expert label.

nnmm avatar Jul 04 '22 12:07 nnmm