You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users are supposed to use zserio::serialize function only because write function is implemented in the zserio::detail namespace.
However, the zserio::serialize function executes before serialization
zserio::detail::validate function to check data correctness
zserio::detail::initializeOffsets or zserio::detail::bitSizeOf function to get the size of the buffer needed for serialization
Both of these functions perform a complete traversal of the Zserio objects tree. But tree traversal is important from a performance perspective. Each tree traversal almost doubles the execution time. This leads to the 3x worse performance compared to a single call of the zserio::detail::write method.
Consider to improve this. For example, it might be that some new write function which would combine validation and writing will be useful. Or it might be that just to allow users to call zserio::detail::validate or zserio::detail::bitSizeOf will be enough.
The text was updated successfully, but these errors were encountered:
Users are supposed to use
zserio::serialize
function only becausewrite
function is implemented in thezserio::detail
namespace.However, the
zserio::serialize
function executes before serializationzserio::detail::validate
function to check data correctnesszserio::detail::initializeOffsets
orzserio::detail::bitSizeOf
function to get the size of the buffer needed for serializationBoth of these functions perform a complete traversal of the Zserio objects tree. But tree traversal is important from a performance perspective. Each tree traversal almost doubles the execution time. This leads to the 3x worse performance compared to a single call of the
zserio::detail::write
method.Consider to improve this. For example, it might be that some new
write
function which would combine validation and writing will be useful. Or it might be that just to allow users to callzserio::detail::validate
orzserio::detail::bitSizeOf
will be enough.The text was updated successfully, but these errors were encountered: