dbus2 / zbus-old

Rust D-Bus crate.
https://gitlab.freedesktop.org/dbus/zbus
Other
49 stars 13 forks source link

Optimize ser/de for array of basic/fixed types #154

Open zeenix opened 3 years ago

zeenix commented 3 years ago

In GitLab by @elmarco on Mar 1, 2021, 12:55

Our Vec implementation is pretty slow, due to the genericity of value handling.

For a rough idea, it takes about 5s to ser/de a 10mb vector of bytes (ay) on a pretty fast CPU.

Here is the flamegraph link: https://elmarco.fedorapeople.org/zbus_vec_flamegraph.svg

Imho, optimizing 'ay' is the most important, as there is a higher chance to transfer big data blobs in this form.

zeenix commented 3 years ago

Imho, optimizing 'ay' is the most important, as there is a higher chance to transfer big data blobs in this form.

I agree but I've a feeling we don't need to special-case y here but implement a solution for arrays in general.

zeenix commented 3 years ago

@elmarco Wasn't this fixed with !267?

zeenix commented 3 years ago

In GitLab by @elmarco on Mar 14, 2021, 18:46

There is room for improvements for arrays others than [u8]