curl-library
curl_multi_socket_action performance problem
Date: Sun, 6 May 2012 14:12:28 +0000
All,
Here is the problem I am experiencing.
I have things set up so that I receive the timeout callback from the multi handle. On receiving the timeout I call curl_multi_socket_action with CURL_SOCKET_TIMEOUT. The problem is that if a large number of easy handles are added before the timeout fires the call to curl_multi_socket_action blocks for a very long time since it iterates through all the sockets and connects them, etc. Needless to say, this can take quite a while and everything else is blocked while this is happening. I see that the socket callback is called for each new handle and I assume that happens as soon as the socket is created and initialized so there is no way to use e/poll before that. Is there no way to make this function faster than to simply not accept new requests until the socket callback is called? Any help would be greatly appreciated.
Thanks,
Josh
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-05-06