brpc icon indicating copy to clipboard operation
brpc copied to clipboard

Support arena allocation for server mode in native protocol

Open oathdruid opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? (你需要的功能是否与某个问题有关?) protobuf introduce arena allocation technology long ago from 3.x version, which could help to reduce dynamic memory allocation cost when large message is met.

brpc do request and response heap allocation deep inside the implementation of protocol, make it hard extend to enable arena allocation. hard like this example use-arena-with-brpc

thanks to the depend on head style inside baidu, tricks like this could also be maintained by keep sync to brpc head version but in out side world, do this patching once and for all seems impossible

Describe the solution you'd like (描述你期望的解决方法) design an standalone plugin point make request and response creation easy to customize. or just provide arena allocation mode in native protocol

Describe alternatives you've considered (描述你想到的折衷方案)

Additional context/screenshots (更多上下文/截图)

oathdruid avatar Jun 25 '24 01:06 oathdruid