Skip to content

Optimize client batching with set operations#8

Open
yuqian19870725-creator wants to merge 2 commits into
carbonengine:mainfrom
yuqian19870725-creator:patch-1
Open

Optimize client batching with set operations#8
yuqian19870725-creator wants to merge 2 commits into
carbonengine:mainfrom
yuqian19870725-creator:patch-1

Conversation

@yuqian19870725-creator

Copy link
Copy Markdown

Summary

  • return client IDs with character history as a set
  • split bubble recipients using set intersection and difference instead of repeated list membership scans
  • add regression coverage for the set return type

This changes the recipient partitioning step from repeated linear membership checks to set operations, avoiding quadratic behavior for large fleet battles.

Validation

  • Python syntax compilation passed for the implementation and test files
  • focused microbenchmark for recipient partitioning:
    • 1,000 clients: 3.025 ms to 0.018 ms (about 172x faster)
    • 5,000 clients: 74.280 ms to 0.177 ms (about 419x faster)
  • these figures cover only the recipient partitioning operation, not the complete server tick
  • the full repository test requires the unavailable blue runtime module in this environment

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