Edit report at http://bugs.php.net/bug.php?id=52522&edit=1

 ID:                 52522
 Updated by:         paj...@php.net
 Reported by:        roman dot neuhauser at ge dot com
 Summary:            php_curl.dll, php_http.dll take 300ms to initialize
 Status:             Assigned
 Type:               Bug
 Package:            cURL related
 Operating System:   Windows
 PHP Version:        5.3.3
 Assigned To:        pajoye
 Block user comment: N

 New Comment:

Duplicate of #50410


Previous Comments:
------------------------------------------------------------------------
[2010-08-03 13:03:34] roman dot neuhauser at ge dot com

Description:
------------
both php_curl.dll and php_http.dll (linked with libcurl) are really slow
to initialize.  on a machine where `php -n /dev/null` or `php -n -m`
takes ~70ms to complete, `php -n -d extension_dir=/... -d
extension=php_curl.dll /dev/null` (or php_http.dll) uses above 300ms.



seen this on multiple hosts ranging from xp sp2 to server 2003 r2 sp2.



5.2 is not affected which makes me believe it is related to the pooling
functionality added in 5.3.

Test script:
---------------
run this with native PHP in the MSYS shell:



: ${PHP53:=/c/Webserver/Apache2.2/php-5.3}

: ${PHP52:=/c/Webserver/Apache2.2/php-5.2}



for p in $PHP53 $PHP52; do

  for d in '' php_curl.dll php_http.dll; do

    echo ${p##*/} using ${d:-nothing}

    time $p/php -n -d extension_dir=$p/ext/ ${d:+-d extension=}$d
/dev/null

  done

done

Expected result:
----------------
php_curl.dll / php_http.dll should add at max 100ms each, or at least
the documentation should mention prominently the consequences of loading
these libraries.  i've read pecl_http's and php_curl's documentation,
and found no mention of a way to disable the time-consuming
functionality.

Actual result:
--------------
php-5.3 using nothing



real    0m0.078s

user    0m0.015s

sys     0m0.016s

php-5.3 using -d extension=php_curl.dll



real    0m0.500s

user    0m0.000s

sys     0m0.015s

php-5.3 using -d extension=php_http.dll



real    0m0.516s

user    0m0.000s

sys     0m0.015s

php-5.2 using nothing



real    0m0.078s

user    0m0.015s

sys     0m0.000s

php-5.2 using -d extension=php_curl.dll



real    0m0.172s

user    0m0.000s

sys     0m0.015s

php-5.2 using -d extension=php_http.dll



real    0m0.078s

user    0m0.000s

sys     0m0.015s


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52522&edit=1

Reply via email to