[Performance] Have World Send Smarter Guild Updates #4796
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a performance adjustment for World where 3k players and 1,800 zoneservers showed strain on World. A grand majority of the CPU load (98%) this was shown to be TCP chatter (server to server).
I ran S<->S packet logging in world and found the following data. This change will be one of several found from these results. https://gist.github.com/Akkadius/12b57fadbbe21ea9a46b854c62cc3a65#file-world-s2s-1m-md
For this PR, this addresses a lot of places where we blast packets to all zoneservers regardless if the zone needs it or not. This is not free especially at the scale of THJ. World is absolutely getting crushed having to allocate memory to send packets to X zoneservers (in this case lets say 1,800) when only say a dozen care about the packet at all.
We need to be smarter about how we relay packets because it adds up tremendously
Type of change
Testing
Tested basic guild updates, create guild, zoning, adding, deleting
I added debugging in my packet sending function which only grabs zone server's that have clients with the interested Guild ID attached.
Checklist