Closed Reousa closed 8 months ago
@Therzok; Extensions served as a temporary placeholder until I removed PlayerManager and conclusions were made over some discord discussions. Admittedly I hadn't considered performance impact yet, given the WIP nature of things, that would've been a later step. 😅
Adjustments made in any case, will rebase #638 after PR acceptance.
By extension & to keep reference, this PR also eliminates dependency on the Locker
object, avoiding potential GC triggers in hotpaths from frequent PlayerManager
member access.
I sadly have no easy way to measure or compare these impacts as of yet, but a mocking of Server
and Client
to simulate some measurable traffic is something I'm attempting.
With that said, should pooling packets & potentially packet buffers be brought into the scope of this refactor (in a later PR)? I recon that'd have far more impact on easing out the GCs? What do you think?
Thanks for removing the allocs!
Pooling sounds good, an alternative would be restructuring the generic packet handling to be use where T:struct, IPacket
and the JIT will do everything else, but that's probably a bigger refactoring compared pooling.
This is in preparation for implementing hot-swappable messaging libraries.
Things done:
PlayerManager
toServer
PlayerManager
toServer
&Client
PlayerManager
toServer
& add querying logic to an extension classWebSocketService
outside ofServer
, and make it transparent to the rest of the programPlayerManager
to point to their counterpartsThis PR is included in a series:
634 - Working
638 - Working
3. #639 - Working