ModernUO/Projects/Server.Tests/Tests/Network/Packets/Outgoing
Kamron Batman 3b75b96008
perf(saves): drop the 9-byte per-entity placement state; write snapshots from worker segment logs
Every ISerializable carried SerializedThread/SerializedPosition/SerializedLength
so WriteSnapshot could gather each entity's bytes from the worker heaps in
dictionary order. The idx records absolute positions, so bin order is free -
the snapshot can be written in worker-heap order instead, and the join inverts:

- Chunks are persistence-homogeneous: SerializeAll declares the owner at each
  boundary, publishing the partial chunk on change.
- Workers log segments (owner, slot range, heap start) plus one length per
  record as they serialize. Positions are implicit because a worker's writes
  are contiguous; identity comes from re-walking the same snapshot slots in
  the same order (guaranteed stable - mutations divert to the pending queues
  until PostWorldSave), or from an entities log on the fallback path.
- WriteSnapshot routes segments by owner, emits idx entries during the
  re-walk, and writes each segment's heap bytes as a single span instead of
  one copy per entity, which also speeds up the background write phase.
- Persistence self-payloads keep placement as three private fields on the
  ~dozens of persistence instances; PushSingle is now typed accordingly.

Net effect: 9 bytes (plus padding) of resident state removed from every item,
mobile, guild, and account on every shard; three interface-property stores
per entity leave the drain hot path (stamping dirtied one cache line per
entity mid-freeze - the lengths log is a single sequential stream); and the
vestigial loader-side length stamp is gone. The transient cost is ~4 bytes
per entity in pooled per-worker logs that are released after each write.

The save format is unchanged (idx v3, same loader); only the write-side
mechanics moved. Adds an end-to-end round-trip test that drives real workers
through the chunk source, snapshots from the segment logs, and reloads.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 22:38:47 -07:00
..
AccountPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
AccountPacketTests.cs perf(saves): drop the 9-byte per-entity placement state; write snapshots from worker segment logs 2026-07-16 22:38:47 -07:00
AttributeNormalizer.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
CombatPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
CombatPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
ContainerPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
ContainerPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
DamagePackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
DamagePacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
EffectPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
EffectPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
EquipmentPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
EquipmentPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
GumpPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
GumpPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
ItemPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
ItemPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
LightPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
LightPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
MapPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
MapPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
MenuPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
MenuPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
MessagePackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
MessagePacketTests.cs perf: Zero-alloc interpolation for SendMessage/Overhead APIs (#2434) 2026-05-03 18:04:02 -07:00
MobilePackets.cs refactor: decompose mobile/corpse hair, delete VirtualHairInfo, fix removal serial (#2462) (#2463) 2026-06-06 14:33:28 -07:00
MobilePacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
MovementPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
MovementPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
PlayerPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
PlayerPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
SecureTradePackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
SecureTradePacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
TargetPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
TargetPacketsTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
VendorBuyPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
VendorBuyPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
VendorSellPackets.cs feat: Adds robust speed hack detection and movement throttling (#2266) 2026-03-07 11:44:37 -08:00
VendorSellPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
VirtualHairPackets.cs refactor: decompose mobile/corpse hair, delete VirtualHairInfo, fix removal serial (#2462) (#2463) 2026-06-06 14:33:28 -07:00
VirtualHairPacketTests.cs refactor: decompose mobile/corpse hair, delete VirtualHairInfo, fix removal serial (#2462) (#2463) 2026-06-06 14:33:28 -07:00