Re: Buffer Size Command Hanging - WeOnlyDo Discussion board

Re: Buffer Size Command Hanging (General questions)

by wodSupport, Wednesday, July 08, 2009, 00:31 (5378 days ago) @ woddrazen

Mike,

I checked our source code, but I don't have good news about this issue. When large data is returned to Waitfor/Execute, on each new byte chunk that arrives from the server full search is made. Usually C++ code can do this fast, but in C# obviously looping through byte array takes time.

Even more, if regular expressions are used, bytes are converted to chars which are then converted to string - all of this takes CPU utilization.

In order to workaround this problem, I suggest you don't use Waitfor/Execute for this purpose, since they are too general. I can't tweak them since htey have to stay general enough, but you would have better luck by storing data that arrives to local buffer, and keep only last line that arrives. This way you can easily check the line if it contains whatever you provided to Waitfor/Execute in the first place.

Can you try that?

Regards,
Kreso


Complete thread: