Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(experimental) Optimize network / socket layer
* This should solve (at least partially) the biggest bottleneck in DoL and OD. Solves some concurrency issues, reduces packet buffer copies, socket misuses, exception spam when a client goes LD (performance impact, this was why the server hung when multiple players went LD at the same time). Tests done with a thousand simulated clients in the same area are promising. * Inbound TCP packets are processed at the start of the game loop, outbound TCP and UDP packets at the end. Inbound UDP packets are still processed immediately when received (outside of the game loop), which should probably be changed eventually, but isn't critical since clients really only send UDP acknowledgment that way. * There's probably still a way to reduce a lot of GC pressure by reducing the amount of packets created (for example, currently, one spell animation creates one GSTCPPacketOut per client, but theoretically one is enough).
- Loading branch information