From: dmirand at abelia-decors dot com
Operating system: Linux 2.4 / glibc 2.3
PHP version: 5.0.0RC3
PHP Bug Type: Performance problem
Bug description: array of objs filling slowness
Description:
------------
When running a portion of script which fills an array with
objects, it is easy to notice a significant slowness depending
on what has already run before in the script., even if that
"pre-processing" is totally independant . The more load that
runs before, the slower the filling will be...
Under 4.3.6 almost no differences between :
- a "just filling" script
- a big load followed by a "filling" part
Both 4.3.6 and 5.0.0 RC3 compiled from source.
Reproduce code:
---------------
$big_load = new BigLoad ;
$big_load->go() ;
unset( $big_load ) ;
/* Filling start */
$arr_obj_orders = array() ;
foreach( $arr_no_order as $no_order )
{
$obj_order = new Order ;
$obj_order->load( $no_order ) ;
// to show filling avancement
echo $no_order ;
$arr_obj_orders[$no_order] = $obj_order ;
}
/* Filling end */
Expected result:
----------------
The expected behavior is of course no slowness with the
"filling" part of the script, ie the same behavior as if there was
no big load before the filling part.
--
Edit bug report at http://bugs.php.net/?id=28866&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28866&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28866&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28866&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28866&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28866&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28866&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28866&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28866&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28866&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28866&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28866&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28866&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28866&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28866&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28866&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28866&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28866&r=float