Commit ebc4458
committed
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.1 parent 215878e commit ebc4458
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
| |||
0 commit comments