Improve and optimize semi-broadcast behavior#921
Conversation
|
Is there some way to move the |
I'm open to ideas anyway, if anyone thinks there's a better of doing it, knowing |
|
No I'm not sure what the best solution would be. I'll have a little longer think, but it may well transpire that this is the best available method. |
|
Explaining my last commit: The change in open.mp server project itself is done because I wasn't checking if Changes in RakNet on the other hand, basically getting rid of Span usage and instead it's just using a pointer to an array of |
|
For reference, the code/concept itself seems fine to me. I was just wondering if there was a very slightly better way to do one part, but it isn't a blocker by any means. |
Improve and optimize semi-broadcast behavior by creating and sending a receiver list to RakServer::Send and RakServer::RPC, instead of manually calling them for each player when we want to broadcast to a list of players, like broadcasting sync packets to streamed players.
This change improves both memory usage and performance noticeably (specially on crowded servers) due to removing the need to allocate packet for every single player you are broadcasting your data to through either packets or RPCs.