1

Resolved

Slow Read Performance

description

With reads, there's a considerable delay as to when an incoming packet is sent to the client and when it is read by the client. Using a packet sniffer, I've observed the RawRead event triggering a few seconds after the sniffer showed the packet being received. There are plenty of available ThreadPool threads when the reads happen, so it's not an issue of a lack of available threads.

comments

Timiz0r wrote Oct 4, 2011 at 8:35 PM

Doing more research and posting as information is found.

I can blaze through responses by sending data, where one send gives one receive. Likewise, I think I have noticed that the client works fine with non-responses.

Timiz0r wrote Oct 5, 2011 at 4:19 PM

I may have fixed the problem, but I can't be sure since the server won't be full for a while.

I changed the way the lock statement works by splitting the sequence tracking into another method and locking that method alone. I'll check in the changes with other updates later, but the issue will remain open until it's confirmed.

Timiz0r wrote Oct 5, 2011 at 8:25 PM

It is not fixed, yet.

Timiz0r wrote Oct 5, 2011 at 9:13 PM

The cause of the bug has something to do with the leftoverdata, as the lag only occurs with that. I'll do more investigating and hopefully put up a fix soon.

Timiz0r wrote Oct 5, 2011 at 9:34 PM

I haven't been able to test the latest fix yet, but the leftover data process now does while (Packet.ContainsCompletePacket(client.LeftoverData)).

Timiz0r wrote Oct 5, 2011 at 9:38 PM

Going through the logic, the fix should work because, previously, only one packet would be read per receive, and, over time, packets would build up. If the problem comes back up, I'll reopen the issue.

wrote Oct 5, 2011 at 9:38 PM

wrote Oct 5, 2011 at 9:38 PM

Timiz0r wrote Oct 5, 2011 at 9:42 PM

I have confirmed it to work.

Timiz0r wrote Nov 9, 2011 at 12:51 PM

** Closed by Timiz0r 10/5/2011 1:38 PM

Timiz0r wrote Nov 9, 2011 at 12:51 PM

Keeping bug reports open as fixed.

wrote Nov 9, 2011 at 12:51 PM

wrote Nov 18, 2011 at 3:28 PM

wrote Feb 13, 2013 at 6:23 PM

wrote May 15, 2013 at 5:09 AM

wrote May 15, 2013 at 5:09 AM

wrote Jun 12, 2013 at 2:02 AM