Skip to content

Client lazy parse ByteBuf to avoid deeply memory copy #1184

@swuferhong

Description

@swuferhong

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Currently, we will do one deeply memory copy when receive Response from server, see NettyClientHandler#channelRead() for more details:

Image

This behavior would unnecessarily increase heap memory usage and negatively impact read performance. Therefore, if precise manual buffer release can be achieved, we can eliminate memory copying here.

Solution

No response

Anything else?

No response

Willingness to contribute

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions