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

Fix chat synchronization in replays. #4792

Merged
merged 3 commits into from Mar 8, 2014
Merged

Conversation

pchote
Copy link
Member

@pchote pchote commented Mar 5, 2014

No description provided.

@phrohdoh
Copy link
Member

phrohdoh commented Mar 5, 2014

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)
Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Member Author

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.

@Mailaender
Copy link
Member

👍 also does not break #4233 in a test merge.

@Mailaender
Copy link
Member

Needs a rebase.

@pchote
Copy link
Member Author

pchote commented Mar 7, 2014

Rebased.

Mailaender added a commit that referenced this pull request Mar 8, 2014
Fix chat synchronization in replays.
@Mailaender Mailaender merged commit 19ac138 into OpenRA:bleed Mar 8, 2014
@Mailaender
Copy link
Member

This introduced a severe regression that I did not see because I never tested a network game #4866.

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.

None yet

4 participants