NetworkSpeedup
Optimizes Valheim's Steam networking send queue by avoiding unnecessary native memory allocations when sending packets.
What it does
Replaces Valheim's ZSteamSocket.SendQueuedPackages() implementation with an optimized version that:
- Avoids
Marshal.AllocHGlobal - Avoids
Marshal.Copy - Sends the existing
byte[]directly using a pinned pointer - Reduces per-packet allocations and memory copying
Sets server framerate from 30 ticks to 128 ticks (configurable)
Performance
Perfomance won't be even noticable but even 0.01% is a win