Dylan K. Taylor 6a64486f55
StandardPacketBroadcaster: Improve performance when broadcasting small packets
In refactors during PM4, I stripped out packet buffer caching, as it was problematic when events alter packets in undetectable ways.
However, I never cleaned this part of the code up properly after enabling DataPacketSendEvent to include multiple packets and multiple targets, so we were still individually encoding the packet(s) for every single session if the sum total of the sizes was below 256 bytes.

This change encodes packets once in the StandardPacketBroadcaster and retains their buffers to post to the session's send buffer directly if the resulting batch is below compression threshold.
This code is still not optimal (see ##5589), but fixing this brings broadcasting performance back to PM3 levels, without any of PM3's problems.
2023-02-22 21:52:12 +00:00
2022-12-06 13:22:54 +00:00
2023-02-21 15:23:25 +00:00
2022-03-09 16:28:38 +00:00
2023-02-06 12:09:19 +00:00
2021-11-30 01:16:28 +00:00
2012-12-07 02:24:55 +01:00
2022-05-11 13:53:52 +01:00
2022-08-16 17:22:22 +01:00


A highly customisable, open source server software for Minecraft: Bedrock Edition written in PHP

CI GitHub release (latest SemVer) Docker image version (latest semver) Discord
GitHub all releases GitHub release (latest by SemVer)

Getting started

Discussion/Help

For developers

Donate

  • Bitcoin Cash (BCH): qq3r46hn6ljnhnqnfwxt5pg3g447eq9jhvw5ddfear
  • Bitcoin (BTC): 171u8K9e4FtU6j3e5sqNoxKUgEw9qWQdRV
  • Stellar Lumens (XLM): GAAC5WZ33HCTE3BFJFZJXONMEIBNHFLBXM2HJVAZHXXPYA3HP5XPPS7T
  • Patreon

Licensing information

This project is licensed under LGPL-3.0. Please see the LICENSE file for details.

pmmp/PocketMine are not affiliated with Mojang. All brands and trademarks belong to their respective owners. PocketMine-MP is not a Mojang-approved software, nor is it associated with Mojang.

Languages
PHP 99.9%