Skip to content

Support arena allocation for server mode in native protocol #2671

Description

@oathdruid

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 (更多上下文/截图)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementimprovements on existing features

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions