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

chore: optimize chat server reads and fix crash #1606

Merged
merged 2 commits into from
Oct 27, 2024
Merged

Conversation

EmosewaMC
Copy link
Collaborator

Tested that players with valid names up to the usual 33 character max are still added to the player container
Tested that you can still team with <= 4 players on a team
Tested that chat server no longer crashes with a bad memberSize variable
Verified that InsertPlayer is indeed much faster now and is no longer a slow point of ChatServer
image

Tested that players with valid names up to the usual 33 character max are still added to the player container
Tested that you can still team with <= 4 players on a team
Tested that chat server no longer crashes with a bad memberSize variable
asserted that InsertPlayer is indeed much faster now and is no longer a slow point of ChatServer
@EmosewaMC
Copy link
Collaborator Author

Also fixes an issue where, due to race conditions, a players name would be twice as long when logging into a world.

Copy link
Member

@DarwinAnim8or DarwinAnim8or left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was making InsertPlayer so slow? I don't see it immediately; just the name reading?

@aronwk-aaron aronwk-aaron merged commit 33a8efd into main Oct 27, 2024
4 checks passed
@aronwk-aaron aronwk-aaron deleted the fix_slow_chat_stuff branch October 27, 2024 03:09
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.

3 participants