Skip to content

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

Merged
melekes merged 6 commits intov0.38.xfrom
mergify/bp/v0.38.x/pr-3403
Jul 5, 2024
Merged

perf(p2p/conn): Remove unneeded global pool buffers in secret connection (backport #3403)#3418
melekes merged 6 commits intov0.38.xfrom
mergify/bp/v0.38.x/pr-3403

Conversation

@mergify
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
@mergify

This comment was marked as resolved.

Copy link

@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
@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