-
Notifications
You must be signed in to change notification settings - Fork 32
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
Refactor replication to use a buffer cache per client #46
Conversation
Codecov ReportPatch coverage:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #46 +/- ##
==========================================
- Coverage 95.47% 93.87% -1.60%
==========================================
Files 10 10
Lines 663 735 +72
==========================================
+ Hits 633 690 +57
- Misses 30 45 +15
☔ View full report in Codecov by Sentry. |
e36d65b
to
0125671
Compare
If a message is empty you should not send it at all. In practice that will add up to a lot of bytes, since most ticks won't have anything to send other than network tick. Afaik it's fine for ack ticks to accumulate a large gap if there are no changes. You can probably do the same on the client side, as long as ack invariants are preserved. |
Now all length are fixint and all entities are varint.
Micro optimization: if there are no despawns then the despawn size isn't needed, and if there are no removals and no despawns then the removal and despawn sizes aren't needed. The deserializer can early-out if it reaches the cursor end when trying to deserialize removals/despawns. To implement this you need to resize the vector to crop the reserved length bytes, because afaik |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Follow-up PRs:
- Remove trailing empty array sizes.
- Serialize entity as two u32 varints.
- Provide config options for serializing component data with varints vs fixed ints.
No description provided.