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

Add a buffer pool on the network receiver side #435

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cBournhonesque
Copy link
Owner

@cBournhonesque cBournhonesque commented Jun 1, 2024

The goal is to avoid allocating when we receive a packet, but instead re-use preallocated vectors that we can copy the packet bytes into.

However when I benchmarked it it didn't make any difference... Maybe because we're not receiving enough packets for it to make a difference in terms of allocations?

@codecov-commenter
Copy link

codecov-commenter commented Jun 1, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 80.95238% with 8 lines in your changes missing coverage. Please review.

Project coverage is 66.90%. Comparing base (5558683) to head (1dcf257).
Report is 226 commits behind head on main.

Files with missing lines Patch % Lines
lightyear/src/utils/pool.rs 82.60% 4 Missing ⚠️
lightyear/src/connection/netcode/client.rs 66.66% 2 Missing ⚠️
lightyear/src/connection/local/client.rs 0.00% 1 Missing ⚠️
lightyear/src/connection/netcode/server.rs 85.71% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #435      +/-   ##
==========================================
- Coverage   66.91%   66.90%   -0.02%     
==========================================
  Files         160      160              
  Lines       10417    10445      +28     
==========================================
+ Hits         6971     6988      +17     
- Misses       3446     3457      +11     

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

@cBournhonesque cBournhonesque changed the title Add a buffer poll on the network receiver side Add a buffer pool on the network receiver side Jun 2, 2024
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.

2 participants