apache / apache/brpc

IOBuf是否能支持连续的内存避免内存拷贝

Open
#2,120 21 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

brpc目前从socket读取到的数据是放在IOBuf中的,但是由于IOBuf是一个非连续的内存缓冲区,如果用户需要保证接收到的是一块连续的内存的话需要进行一次内存拷贝,但是在大数据量的场景下内存拷贝存在性能瓶颈,请问有什么方法可以避免这次内存拷贝呢

Contributor guide

Open the contributing guide

Research direction

Start by examining brpc's IOBuf implementation and the socket receive path described in the issue. Determine whether the proposed capability requires a new buffer or API design, then define how contiguous data would be provided without the current copy. Done should include an agreed approach and validation for large payload performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.