From:             busia at tiscali dot it
Operating system: Irrilevant
PHP version:      5.3CVS-2009-06-04 (snap)
PHP Bug Type:     Feature/Change Request
Bug description:  Memory request by objects optimization

Description:
------------
In bug report #48434 lbarn...@php.net wrote me:
---------------------------
PHP uses an array internally to store all objects. When you create more
objects, the array is grown. When you destroy some objects, the array is
not resized, so that creating other objects is faster.

This is the difference you see; ~32 bytes per object.

This is not due to the allocator. There is a few other caches of this kind
in PHP that make it running faster.
---------------------------

Using many objects this is a problem, I need a function to force resizing
of the internal object array. I know that this would slow down the script
but this function (like mysql_free_result) would be useful in many
situations (like working on many objects array). Is it possible to have a
function like that?

Thanks


-- 
Edit bug report at http://bugs.php.net/?id=48471&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=48471&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=48471&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=48471&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=48471&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48471&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48471&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48471&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48471&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48471&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48471&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48471&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48471&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48471&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48471&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48471&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48471&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48471&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48471&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48471&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48471&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48471&r=mysqlcfg

Reply via email to