Avoid unnecessary copies of Thrift binary types#6459
Conversation
|
In #6430, I suggested That being said, if it doesn't seem like that is an issue here, I think this is a good fix for the mentioned issue we are seeing. |
|
Closing due to discussion on #6455 ; I didn't realize the getter was also calling the setter. |
Avoid making copies using the public API setter when truncating the underlying stream to get the array by assigning the result of the optional resize operation directly to the variable, and avoiding the setter that performs the unneeded copy.
|
Based on the discussion in #6455, I've updated this PR with an additional patch to the generated code that fixes what appears to be a bug in the upstream thrift that makes an unneeded extra copy whenever the byte array getter is called. |
No description provided.