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
With #87 we import the key extraction based on the PoC. This implementation requires a couple of allocations for extracting a key from a grpc message (allocating growing target buffer and HashMaps for parsing the individual parts of a key). Since the key extraction is on the hot path this might be a problem.
First, we should measure the impact of these allocations. If this is noticeable, we might explore some potential optimizations:
Using a SegmentedBuf instead of a BytesMut for collecting the parts of the final key. This should help avoiding to allocate a growing byte buffer.
Add another pass over the grpc message to collect meta information about the key. This information includes its total length and where each field is located. That way, we could pre-allocate a correctly sized BytesMut and don't have to reorder the fields since we would know exactly where to put them in the final BytesMut.
The text was updated successfully, but these errors were encountered:
With #87 we import the key extraction based on the PoC. This implementation requires a couple of allocations for extracting a key from a grpc message (allocating growing target buffer and
HashMaps
for parsing the individual parts of a key). Since the key extraction is on the hot path this might be a problem.First, we should measure the impact of these allocations. If this is noticeable, we might explore some potential optimizations:
SegmentedBuf
instead of aBytesMut
for collecting the parts of the final key. This should help avoiding to allocate a growing byte buffer.BytesMut
and don't have to reorder the fields since we would know exactly where to put them in the finalBytesMut
.The text was updated successfully, but these errors were encountered: