ID: 31332
Updated by: [EMAIL PROTECTED]
Reported By: marekm at apnet dot pl
-Status: Open
+Status: Verified
Bug Type: Performance problem
-Operating System: Win32/Linux
+Operating System: *
-PHP Version: 4.3.10
+PHP Version: 4CVS, 5CVS (2005-01-04)
Previous Comments:
------------------------------------------------------------------------
[2004-12-30 10:13:09] chris-php at bolt dot cx
Pretty sure we're getting hit by this as well. We use serialize a lot
(memcached), and upgrading from PHP 4.3.9 to 4.3.10 tripled our
servers' load averages.
------------------------------------------------------------------------
[2004-12-29 12:30:09] marekm at apnet dot pl
Description:
------------
I keep big multidimensional arrays serialize()'d into strings in
database.
After upgrade from 4.3.9 -> 4.3.10 I noticed, that unserialize()
function on some of them work even 20 times slower. On other the
slowdown is minimal.
Reproduce code:
---------------
<?
function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$f=fopen("serialized.txt","r");
$l1=fgets($f,1000000);
fclose($f);
$t1=getmicrotime();
$a=unserialize($l1);
echo(getmicrotime()-$t1);
?>
The tested "serialized.txt" file can be downloaded from
http://ap.aptus.pl/serialized.txt
Expected result:
----------------
The above script working as fast as in 4.3.9
Actual result:
--------------
The script works about 20x slower.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31332&edit=1