8000 perf(p2p/conn): Remove unneeded global pool buffers in secret connection (backport #3403) by mergify[bot] · Pull Request #3418 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

perf(p2p/conn): Remove unneeded global pool buffers in secret connection (backport #3403) #3418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 5, 2024

Conversation

mergify[bot]
Copy link
Contributor
@mergify mergify bot commented Jul 3, 2024

Closes #3197

Remove unneeded global pool buffers in secret connection, instead just use a byte slice per secret connection, and just once for all packet sends. This is a 15% improvement to Secret connection's CPU time in Write, and 8% to read

We have much bigger system bottlenecks to fix (in the same RecvRoutine and SendRoutine calls), but this felt very low-lift, hence making the PR.


PR checklist

  • Tests written/updated - N/A
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments
  • Title follows the Conventional Commits spec

This is an automatic backport of pull request #3403 done by [Mergify](https://mergify.com).

…ion (#3403)

Closes #3197

Remove unneeded global pool buffers in secret connection, instead just
use a byte slice per secret connection, and just once for all packet
sends. This is a 15% improvement to Secret connection's CPU time in
Write, and 8% to read

We have much bigger system bottlenecks to fix (in the same RecvRoutine
and SendRoutine calls), but this felt very low-lift, hence making the
PR.

---

#### PR checklist

- [X] Tests written/updated  - N/A
- [X] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [X] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [X] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Daniel <daniel.cason@informal.systems>
(cherry picked from commit d335255)

# Conflicts:
#	.changelog/v0.38.8/improvements/3403-remove-pool-buffer-usage-in-secretconn.md
#	go.mod
#	go.sum
#	p2p/conn/secret_connection.go
@mergify mergify bot requested a review from a team as a code owner July 3, 2024 22:47
@mergify mergify bot added the conflicts label Jul 3, 2024

This comment was marked as resolved.

Copy link
Contributor
@cason cason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diffs match.

@melekes melekes merged commit 9ca0b49 into v0.38.x Jul 5, 2024
21 checks passed
@melekes melekes deleted the mergify/bp/v0.38.x/pr-3403 branch July 5, 2024 14:07
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.

5 participants
0