Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Override ReadByte in PacketReader.
Turns out, the normal BinaryReader was calling NetworkStream.ReadByte, which didn't override ReadByte. As such, every single call to ReadByte would wastefully allocate a 1 element byte array, which ended up being responsible for a significant portion of allocations when running server for extended periods of time.
- Loading branch information
Showing with 8 additions and 1 deletion.