Changes between Initial Version and Version 1 of Ticket #9801, comment 2
- Timestamp:
- Oct 4, 2023, 4:12:45 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9801, comment 2
initial v1 1 1 The C# reading code allocates an array for the full size of the message and fills it as data is read, so there is no concatenation to slow down the read. 2 2 3 One possibility is that the async read is not getting CPU time very often because the Unity is not querying the task often enough, maybe only once per rendering update loop. The code currently reads while data is available and then does a stream.ReadSync() call. I could test that by always doing a synchronous stream.Read() until the whole message is read. Try that. 3 One possibility is that the async read is not getting CPU time very often because the Unity is not querying the task often enough, maybe only once per rendering update loop. The code currently reads while data is available and then does a stream.ReadSync() call. I could test that by always doing a synchronous stream.Read() until the whole message is read. Try that. The same problem could be slowing the writing to the socket using WriteAsync(). Can change that to Write() as a test.