Skip to content

Prefer BufRead#508

Merged
rustaceanrob merged 1 commit into2140-dev:masterfrom
rustaceanrob:10-10-buf-read
Oct 11, 2025
Merged

Prefer BufRead#508
rustaceanrob merged 1 commit into2140-dev:masterfrom
rustaceanrob:10-10-buf-read

Conversation

@rustaceanrob
Copy link
Copy Markdown
Collaborator

From tokio documentation:

BufReader can improve the speed of programs that make small
and repeated read calls to the same file or network socket.

This should indeed be the case as there is a small read followed by a larger read for all bitcoin p2p messages. Ignoring the writing side as the client reads far more than it writes.

@nyonson sanity check

From `tokio` documentation:

> BufReader can improve the speed of programs that make small
> and repeated read calls to the same file or network socket.

This should indeed be the case as there is a small read followed by a
larger read for all bitcoin p2p messages. Ignoring the writing side as
the client reads far more than it writes.
@rustaceanrob rustaceanrob merged commit a4ddf7b into 2140-dev:master Oct 11, 2025
10 checks passed
@rustaceanrob rustaceanrob deleted the 10-10-buf-read branch October 11, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant