ZF-4807: Document general PHP performance tips

Issue Type: Sub-task Created: 2008-11-05T07:25:43.000+0000 Last Updated: 2009-10-16T06:42:00.000+0000 Status: Resolved Fix version(s): Reporter: Matthew Weier O'Phinney (matthew) Assignee: Matthew Weier O'Phinney (matthew) Tags: Related issues: Attachments:



Posted by Satoru Yoshida (satoruyoshida) on 2009-06-10T01:43:22.000+0000

I hear that you can execute php faster if you set date.time_zone directive in php.ini .

origin of the information (In Japanese) ;

Posted by thing2b (thing2b) on 2009-06-10T14:36:11.000+0000

I think that one general PHP performance tip that should be mentioned is in regards to cyclical references and memory performance.

It is my understanding that any object that has cyclical references will not be garbage collected in PHP. When a framework like zend framework is used for a longer process this can cause great problems. In my case, a script (using ZF) that only takes 26 seconds to complete keeps falling over with an out of memory error. In 26 seconds it was using over 100 MB for something quite simple. The reason? Every single data object that I had created was still in memory. As my data objects were hierarchical , they all had references to their parent and their children. This caused cyclical references and nothing was removed from memory.

I am now having to manually destruct my PHP object to achieve better memory performance.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.