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
Fix chat synchronization in replays. #4792
Conversation
This will be a nice nit fix for casters I imagine. Cool deal if all works well! |
while( replayStream.Position < replayStream.Length ) | ||
public void Receive(Action<int, byte[]> packetFn) | ||
{ | ||
while (sync.Count != 0) |
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.
sync.Any()
should terminate earlier → better performance.
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.
sync is a list, so it should give roughly identical performance.
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.
This is old code that I haven't changed, and List.Count just returns an internal size member anyway so there is no perf difference.
This probably wants to be using a queue instead of faking one with a list, so I may change this anyway.
👍 also does not break #4233 in a test merge. |
Needs a rebase. |
Rebased. |
Fix chat synchronization in replays.
This introduced a severe regression that I did not see because I never tested a network game #4866. |
No description provided.