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

Proposal for C# SDK performance #1934

Open
bfops opened this issue Nov 4, 2024 · 0 comments
Open

Proposal for C# SDK performance #1934

bfops opened this issue Nov 4, 2024 · 0 comments
Assignees

Comments

@bfops
Copy link
Collaborator

bfops commented Nov 4, 2024

The BSATN codegen for c# often generates pattern like new(new()) to emulate rust's variant types, and wraps certain value types into reference classes, such as Timestamp and EnergyQuota.

Similarly, many allocations for encoding and decoding of messages can be made once and reused, or at least pooled to avoid allocations.

A great deal of GC overhead and pressure can be removed by refactoring codegen to emit high-performance C#.

One benefit of this is to gain support for Burst compilation and ECS in Unity, as they do not allow reference types to be used at all.

Proposal should also look at the way updates are processed by SDK clients and look at a way to send the matching memory layouts directly from rust. Right now an intermediate client-side processing pass using a temporary hashmap is required to combine matching inserts/deletes into updates.

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

No branches or pull requests

2 participants