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

Consider reverting to the C-style ring-buffer for SavedState #13

Closed
james7132 opened this issue Jun 5, 2021 · 1 comment
Closed

Consider reverting to the C-style ring-buffer for SavedState #13

james7132 opened this issue Jun 5, 2021 · 1 comment

Comments

@james7132
Copy link
Member

Commit cf0b896 fixed #12 but replaced the SaveState ring buffer with a frame-keyed hashmap instead. This adds the overhead of clearing out the HashMap of old states each time a frame is confirmed by a remote, and potentially allocates more on the heap each time a new state is saved. This indirection is likely not particularly cache friendly.

However, given this HashMap should normally never be more than 8-20 entries large at a given time, this may be a moot point in terms of performance.

Leaving this as an issue to revisit this when time permits.

@james7132
Copy link
Member Author

Implemented as of 10c5fd8 without reintroducing the desync that caused #12.

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

1 participant