cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: re-using easy handles with muti-interface

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 6 Jun 2013 18:37:56 +0200 (CEST)

On Wed, 5 Jun 2013, Shawn Delaney wrote:

> I wanted to know if there is any benefit for an application to keep a cache
> of easy handles for re-use with the multi-interface. From the FAQ, a
> connection cache is associated with the multi-handle. When an easy handle is
> passed to the multi-interface a connection from the connection cache is
> given to the easy handle. You can see this happening from the debug output.
> However, even if the same easy handle is re-used in a subsequent transfer it
> may get assigned a different connection. So, is there advantage for an
> application to keep a cache of easy handles for re-use. There doesn't seem
> to be for connection pooling.

No, there's hardly any advantage to do an easy handle pool. You'll probably
gain in that it'll be less malloc/free operations to do, but all the
connection re-use logic etc is already done independently of which easy handle
you're adding or using within the multi handle.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-06-06