From:             cws at miraclenet dot co dot th
Operating system: FreeBSD
PHP version:      4.3.11
PHP Bug Type:     Performance problem
Bug description:  Slow serialize on FreeBSD

Description:
------------
serialize use a lot of realloc which are very slow on FreeBSD

>From - http://rgarciasuarez.free.fr/p5p/p5p-200307-1.pod -

Dan Kogai explained that FreeBSD comes with an implementation of malloc()
that is optimized for paged memory, and safe from duplicate free() calls.
But the downside is that realloc() is very slow. That's usually not a big
deal, because most programs don't use realloc() very often -- but perl
does. (The default configuration of perl on FreeBSD is to use perl's
internal malloc, that hasn't this realloc limitation.)

Serialize use a fix incremental value (SMART_STR_PREALLOC in
php_smart_ptr.h). It better for serialize to use exponential incremential
value to reduce number of realloc. 


-- 
Edit bug report at http://bugs.php.net/?id=32727&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32727&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32727&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32727&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32727&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32727&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32727&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32727&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32727&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32727&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32727&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32727&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32727&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32727&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32727&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32727&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32727&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32727&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32727&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32727&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32727&r=mysqlcfg

Reply via email to