php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28866 array of objs filling slowness
Submitted: 2004-06-21 13:15 UTC Modified: 2005-02-15 11:30 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: dmirand at abelia-decors dot com Assigned:
Status: Closed Package: Performance problem
PHP Version: 5.0.0RC3 OS: Linux 2.4 / glibc 2.3
Private report: No CVE-ID: None
 [2004-06-21 13:15 UTC] dmirand at abelia-decors dot com
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. 
 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-15 11:30 UTC] dmirand at abelia-decors dot com
Much better now ! 
Need to say that my app has pretty much changed since the 
bug report... 
Thanks !
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Mar 29 13:01:26 2020 UTC