ID: 31332 Comment by: ralf dot praschak at gmx dot net Reported By: marekm at apnet dot pl Status: Verified Bug Type: Performance problem Operating System: * PHP Version: 4CVS, 5CVS (2005-01-04) New Comment:
i use vbulletin 3.0.5. the forumcache is also unserialized. i tracked this with the nusphere profiler. with php 4.3.9 (or 5.0.2) it takes around 300ms. with php 4.3.10 (or 5.0.3) it takes 17s and more !!! the cache is around 2.5 megs big ;( 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