Closed felixf4xu closed 9 months ago
@felixf4xu Thanks, for raising this question!
In order for messages to be zero-copyable they need to have a fixed-sized otherwise iceoryx does not know how much memory to allocate in the shared memory area.
the function of publish costs about 139,394 us, which is unacceptably slow.
What you are seeing here is the simple, straightforward serialization implemented in rmw_iceoryx
. It takes some time because the publisher needs to serialize the message and the subscriber needs to deserialize.
To make full use of zero-copy, what you would need to do in your project, is to change all messages to be fixed-size. For example, have a look at this repository. Here you can see different point cloud message types defined. The caveat with such an approach is that the compatibility between the message types breaks and you need some conversion method.
@felixf4xu Closing this issue. If you have more questions, feel free to re-open this issue.
Hi,
I'm currently using
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
and in my code belowthe function of
publish
costs about 139,394 us, which is unacceptably slow.I'd like to check if I switch to rmw_iceoryx, because of the zero-copy design, will the function of
publish
cost less time?