-
Type:
Improvement
-
Status: Resolved
-
Priority:
Normal
-
Resolution: Fixed
-
Fix Version/s: 4.0
-
Component/s: Messaging/Client
-
Labels:
-
Change Category:Performance
-
Complexity:Low Hanging Fruit
-
Platform:All
-
Impacts:None
-
Source Control Link:
-
Test and Documentation Plan:
In the current message encoding implementation, it first calculates the `encodeSize` and allocates the bytebuffer with that size.
However, during encoding, it assumes the worst case of writing UTF8 string to allocate bytes, i.e. assuming each letter takes 3 bytes.
The over-estimation further leads to resizing the underlying array and data copy.
- links to