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

don't preallocate the slice for STREAM frames when composing a packet #4314

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

marten-seemann
Copy link
Member

The slice will be allocated when STREAM frames are appended. By not preallocating it is made sure that the slice is only created in cases where STREAM frames are actually sent in this packet.

Part of #3526.

The slice will be allocated when STREAM frames are appended. By not
preallocating it is made sure that the slice is only created in cases
where STREAM frames are actually sent in this packet.
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c22a3c8) 84.15% compared to head (8906d25) 84.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4314      +/-   ##
==========================================
+ Coverage   84.15%   84.17%   +0.02%     
==========================================
  Files         150      150              
  Lines       15368    15367       -1     
==========================================
+ Hits        12932    12934       +2     
+ Misses       1938     1935       -3     
  Partials      498      498              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marten-seemann marten-seemann added this to the v0.42 milestone Feb 8, 2024
@marten-seemann marten-seemann merged commit f54a32e into master Feb 9, 2024
34 checks passed
@marten-seemann marten-seemann deleted the payload-frames-prealloc branch February 9, 2024 04:54
mgjeong pushed a commit to mgjeong/quic-go that referenced this pull request Feb 13, 2024
…quic-go#4314)

The slice will be allocated when STREAM frames are appended. By not
preallocating it is made sure that the slice is only created in cases
where STREAM frames are actually sent in this packet.
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.

None yet

1 participant