Skip to content

Comments

feat: repgraph-driven per-client deltas#28

Merged
zachsmith1 merged 3 commits intomainfrom
feat/per-client-change-lists
Feb 1, 2026
Merged

feat: repgraph-driven per-client deltas#28
zachsmith1 merged 3 commits intomainfrom
feat/per-client-change-lists

Conversation

@zachsmith1
Copy link
Contributor

Summary

  • Use repgraph to build per-client deltas (no per-client filtering/cloning).
  • Reuse per-client encoder state + buffers (delta/full/compact) to cut allocations.
  • Add BevySchema::build_delta_update for repgraph world adapter.

Benchmarks (baseline -> optimized)

Scenario A (Relevancy, 1024 ents, 128 clients, 10% dirty)

  • bytes_avg: 254 -> 254
  • encode_us_avg: 433 -> 411 (~5% better)
  • encode_us_p95: 554 -> 498 (~10% better)

Scenario B (Dense, 512 ents, 1 client, 100% dirty)

  • bytes_avg: 5515 -> 5515
  • encode_us_avg: 1440 -> 1806 (worse; graph overhead dominates single-client)

Scenario C (Loss, 512 ents, 64 clients, 10% dirty, drop 3%, reorder 5%)

  • bytes_avg: 129 -> 129
  • encode_us_avg: 334 -> 202 (~40% better)
  • encode_us_p95: 452 -> 243 (~46% better)

Notes

  • This shifts per-client work to "encode-only" and reuses buffers.
  • Dense single-client case shows repgraph overhead; multi-client cases improve.

Tests

  • cargo clippy --all-targets --all-features

@zachsmith1 zachsmith1 merged commit d16be5b into main Feb 1, 2026
10 checks passed
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.

1 participant