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
Generated code typically does new(SomeType) now before calling SendMsg(). It allocates new memory every time that gets copied. Benchmarks show that memory usage can be reduced drastically by as much as 50% if the serialization buffers could be reused between different SendMsg() calls: thanos-io/thanos#4535.
However, SendMsg() now returns before the message is on the wire:
// SendMsg blocks until:
// - There is sufficient flow control to schedule m with the transport, or
// - The stream is done, or
// - The stream breaks.
So, the previously linked PR is broken as a result. Seems like this old issue is related: #2159. But, I believe that this use case has not been considered before. Is it even possible to achieve what I am trying to do?
Someone even tried to work around this problem by using finalizers: http://www.golangdevops.com/2019/12/31/autopool/ but the performance improvements are very small with that. Could you please consider implementing this use-case again? Because it seems like it is impossible to do this with the current interface.
The text was updated successfully, but these errors were encountered:
Generated code typically does
new(SomeType)
now before callingSendMsg()
. It allocates new memory every time that gets copied. Benchmarks show that memory usage can be reduced drastically by as much as 50% if the serialization buffers could be reused between differentSendMsg()
calls: thanos-io/thanos#4535.However, SendMsg() now returns before the message is on the wire:
So, the previously linked PR is broken as a result. Seems like this old issue is related: #2159. But, I believe that this use case has not been considered before. Is it even possible to achieve what I am trying to do?
Someone even tried to work around this problem by using finalizers: http://www.golangdevops.com/2019/12/31/autopool/ but the performance improvements are very small with that. Could you please consider implementing this use-case again? Because it seems like it is impossible to do this with the current interface.
The text was updated successfully, but these errors were encountered: