cURL / Mailing Lists / curl-library / Single Mail


curl_global_init() performance issue

From: Sergey S. <>
Date: Fri, 16 Apr 2010 00:47:22 +0400


this function call takes too long when using latest versions of libcurl, it
causes my UI freeze

curl_global_init(CURL_GLOBAL_WIN32) works fine but I need SSL support

I built different versions of libcurl using Visual C++ 2005 under Windows

I used the command:
"nmake -f Makefile vc-dll-ssl-dll-zlib-dll"

I tried to measure performance of this function by using the following code:

#include <stdio.h>
#include <string.h>
#include <curl/curl.h>

int main(void)
CURL *curl;
CURLcode res;
DWORD time1 = GetTickCount();
printf("\r\nTime elapsed: %d msec\r\n", (int)GetTickCount()-time1);
return 0;

I got such results

Windows XP SP3:

libcurl/7.19.5 OpenSSL/1.0.0 zlib/1.2.4
Time elapsed: 16 msec

libcurl/7.19.7 OpenSSL/1.0.0 zlib/1.2.4
Time elapsed: 219 msec

libcurl/7.20.1 OpenSSL/1.0.0 zlib/1.2.4
Time elapsed: 281 msec

 I also tested this code under Windows 7 Professional:

libcurl/7.20.1 OpenSSL/1.0.0 zlib/1.2.4
Time elapsed: 1312 msec

Am I doing something wrong? Now I am forced to downgrade to libcurl/7.19.5.

Thank you in advance.

List admin:
Received on 2010-04-15