#31588 [NEW]: First execution of OpenSSL encryption/decryption function is very slow

From: Date: Mon, 17 Jan 2005 23:03:52 +0000
Subject: #31588 [NEW]: First execution of OpenSSL encryption/decryption function is very slow
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72329@lists.php.net to get a copy of this message
From: bolzen at navigator dot lv Operating system: Windows 2003 PHP version: 5.0.3 PHP Bug Type: Performance problem Bug description: First execution of OpenSSL encryption/decryption function is very slow Description: ------------ When I use any OpenSSL encryption/decryption function (like openssl_seal, openssl_open, openssl_public_encrypt, openssl_private_decrypt, etc.) it takes very long time to execute, when it has been called in a first time. After that other function calls performs very fast in the same script. Reproduce code: --------------- $btime = microtime(true); openssl_seal('Some information', $sealed, $ekeys, array(openssl_get_publickey('file://C:\512.pub'))); echo 'Time: '.(microtime(true) - $btime); $btime = microtime(true); openssl_seal('Some information', $sealed, $ekeys, array(openssl_get_publickey('file://C:\1024.pub'))); echo '<br>Time: '.(microtime(true) - $btime); Expected result: ---------------- Time: 0.00************ Time: 0.00075888633728 Actual result: -------------- Time: 0.969028949738 Time: 0.00075888633728 -- Edit bug report at http://bugs.php.net/?id=31588&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31588&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31588&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31588&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31588&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31588&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31588&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31588&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31588&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31588&r=support Expected behavior: http://bugs.php.net/fix.php?id=31588&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31588&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31588&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31588&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31588&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31588&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31588&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31588&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31588&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31588&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31588&r=mysqlcfg

« previous php.bugs (#72329) next »