|Subject:||Re: Lots of 150+ TCP Connections / Excessive CPU loading|
|Posted by:||Martin James (email@example.com)|
|Date:||Fri, 01 Sep 2006|
> - Why is the stuff that calls OnExecute waste so much CPU time acheiving
The 'stuff that calls OnExecute' is a simple loop that calls OnExecute
continually until an exception occurs that terminates the connection.
AFAIK, the 'Indy Internals' you refer to are negligible. The only way
the II could use up a lot of CPU is if the OnExecute also does
next-to-nothing and returns without doing anything that blocks.
What does your OnExecute code look like? It should, somewhere, have a
blocking call that takes the calling thread out of the running/ready
state until some network activity or other event, (usually, *but not
necessarily*, a socket read), completes/triggers.
To quote the favorite phrase of Remy Lebeau, 'Please show your actual
Lots of 150+ TCP Connections / Excessive CPU loading posted by Tim Hyde on Thu, 31 Aug 2006