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 allocate for acked packets #2899

Merged
merged 2 commits into from
Dec 5, 2020

Conversation

marten-seemann
Copy link
Member

The problem here is that the congestion controller expects that OnPacketLost is called before OnPacketAcked (or doesn't it?), so we need to somehow create a slice of acknowledged packets. We can just reuse the same slice every time though, thereby effectively avoiding allocations.

@codecov
Copy link

codecov bot commented Nov 22, 2020

Codecov Report

Merging #2899 (8d14d76) into master (69158cf) will increase coverage by 0.01%.
The diff coverage is 88.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2899      +/-   ##
==========================================
+ Coverage   85.77%   85.79%   +0.01%     
==========================================
  Files         133      133              
  Lines        9187     9181       -6     
==========================================
- Hits         7880     7876       -4     
+ Misses        959      958       -1     
+ Partials      348      347       -1     
Impacted Files Coverage Δ
internal/flowcontrol/base_flow_controller.go 100.00% <ø> (ø)
internal/ackhandler/sent_packet_handler.go 73.52% <66.67%> (+0.47%) ⬆️
internal/flowcontrol/connection_flow_controller.go 100.00% <100.00%> (ø)
internal/flowcontrol/stream_flow_controller.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed1956f...8d14d76. Read the comment docs.

@marten-seemann marten-seemann merged commit 1ade038 into master Dec 5, 2020
@marten-seemann marten-seemann deleted the dont-allocate-for-acked-packets branch December 5, 2020 16:19
@aschmahmann aschmahmann mentioned this pull request May 14, 2021
71 tasks
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.

2 participants