-
Notifications
You must be signed in to change notification settings - Fork 138
Open
Labels
area/deserializationperformanceImproves performance of existing featuresImproves performance of existing features
Milestone
Description
custom payload deserialization uses types::read_bytes_map which returns HashMap<String, Vec<u8>>.
Those allocations are unnecessary because we don't return custom payload to the user - and even if we did it could be done in more clever way.
Deserializing to HashMap<String, Bytes> would improve the situation without very deep changes. Alternatively we could deserialize to HashMap<String, &[u8]> or even HashMap<&str, &[u8]>, but that may require deeper changes.
Custom payload is a rarely used feature, so this overhead is not problematic for now.
With tablets it would cause 2 additional allocations when tablet feedback is received - not too bad, but it would be nice to fix it.
Metadata
Metadata
Assignees
Labels
area/deserializationperformanceImproves performance of existing featuresImproves performance of existing features