cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Performance of POST method

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 2 Nov 2001 08:11:36 +0100 (MET)

On Thu, 1 Nov 2001, Pedro Medeiros wrote:

> Hi! At the first time my program runs it takes almost a second between
> curl_easy_perform() and the callback set by CURLOPT_WRITEFUNCTION in
> curl_easy_setopt. Next requests are faster, but not very good either.
> Even if the form and the size of the answer are minimal and Apache is
> running on the same machine, I get this latency.
>
> I know it's not a problem of Apache. So how can I speed up a POST method
> using libcurl?

This may come as a surprise to you, but libcurl does its very best to perform
all its duties as fast as possible. I promise you, it does not try to make
anything slower than they have to be.

The time it takes is probably because of the name lookup and the connect
phase.

I don't think anyone would be happier than me if you could point out how we
could make libcurl perform these issues faster than it currently does.

You can very easily just single-step through libcurl with a debugger when you
invoke the _perform() call, and then you can judge for yourself what it is
doing that is taking all that time.

I'm only human, I might have done something wrong in there.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-11-02