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

Feature: reduce bandwidth needed to serve clients the serverlist #25

Merged
merged 1 commit into from Jul 18, 2021

Conversation

TrueBrain
Copy link
Member

Game Coordinator protocol 4 allows us to send the client a table
of NewGRFs, and after that use an index into that table for each
server. This heavily reduces the size of the full serverlist, from
~60KB to ~20KB.
Additionally, we now also send the name of the NewGRF to the client.
In case the client doesn't have the NewGRF yet, it can now show
the name of the NewGRF instead of the grfid or md5sum.

Further more, this reduces the load on redis, as we only update
NewGRFs when there is something to update, instead of every 30
seconds. NewGRFs in multiplayer games can only change when starting
a newgame, and never during a game.

@TrueBrain TrueBrain marked this pull request as draft July 18, 2021 12:10
@TrueBrain TrueBrain force-pushed the gc-optimizations branch 2 times, most recently from 11469b2 to 2803c24 Compare July 18, 2021 13:13
Game Coordinator protocol 4 allows us to send the client a table
of NewGRFs, and after that use an index into that table for each
server. This heavily reduces the size of the full serverlist, from
~60KB to ~20KB.
Additionally, we now also send the name of the NewGRF to the client.
In case the client doesn't have the NewGRF yet, it can now show
the name of the NewGRF instead of the grfid or md5sum.

Further more, this reduces the load on redis, as we only update
NewGRFs when there is something to update, instead of every 30
seconds. NewGRFs in multiplayer games can only change when starting
a newgame, and never during a game.
@TrueBrain TrueBrain marked this pull request as ready for review July 18, 2021 13:44
@TrueBrain TrueBrain merged commit 15ff189 into OpenTTD:main Jul 18, 2021
@TrueBrain TrueBrain deleted the gc-optimizations branch July 18, 2021 13:58
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

1 participant