Skip to content
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

v1.18: quic: use smallvec to aggregate chunks, save 1 alloc per packet (backport of #735) #742

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Apr 11, 2024

Use smallvec to hold chunks. Streams are packet-sized so we don't expect them to have many chunks. This saves us an allocation for each packet.


This is an automatic backport of pull request #735 done by Mergify.

Copy link
Author

mergify bot commented Apr 11, 2024

Cherry-pick of 55ab7fa has failed:

On branch mergify/bp/v1.18/pr-735
Your branch is up to date with 'origin/v1.18'.

You are currently cherry-picking commit 55ab7fadbc.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   Cargo.lock
	modified:   Cargo.toml

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   programs/sbf/Cargo.lock
	both modified:   streamer/Cargo.toml
	both modified:   streamer/src/nonblocking/quic.rs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

quic: use smallvec, save one allocation per packet

Use smallvec to hold chunks. Streams are packet-sized so we don't expect
them to have many chunks. This saves us an allocation for each packet.

(cherry picked from commit 55ab7fa)

# Conflicts:
#	programs/sbf/Cargo.lock
#	streamer/Cargo.toml
#	streamer/src/nonblocking/quic.rs
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.5%. Comparing base (cf5e8d3) to head (189b978).

Additional details and impacted files
@@            Coverage Diff            @@
##            v1.18     #742     +/-   ##
=========================================
- Coverage    81.5%    81.5%   -0.1%     
=========================================
  Files         827      827             
  Lines      224833   224832      -1     
=========================================
- Hits       183440   183427     -13     
- Misses      41393    41405     +12     

@t-nelson t-nelson merged commit 1de2d32 into v1.18 Apr 11, 2024
35 checks passed
@t-nelson t-nelson deleted the mergify/bp/v1.18/pr-735 branch April 11, 2024 16:36
@steviez
Copy link

steviez commented Apr 11, 2024

Got a little sidetracked but here is a post-merge LGTM

anwayde pushed a commit to firedancer-io/agave that referenced this pull request Jul 23, 2024
…t (backport of anza-xyz#735) (anza-xyz#742)

quic: use smallvec to aggregate chunks, save 1 alloc per packet (anza-xyz#735)

quic: use smallvec, save one allocation per packet

Use smallvec to hold chunks. Streams are packet-sized so we don't expect
them to have many chunks. This saves us an allocation for each packet.

(cherry picked from commit 55ab7fa)

# Conflicts:
#	programs/sbf/Cargo.lock
#	streamer/Cargo.toml
#	streamer/src/nonblocking/quic.rs

Co-authored-by: Alessandro Decina <alessandro.d@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants