Issue Details (XML | Word | Printable)

Key: ZF-4807
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Matthew Weier O'Phinney
Reporter: Matthew Weier O'Phinney
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework
ZF-4786

Document general PHP performance tips

Created: 05/Nov/08 07:25 AM   Updated: 16/Oct/09 06:42 AM   Resolved: 16/Oct/09 06:42 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified


Satoru Yoshida added a comment - 10/Jun/09 01:43 AM

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

origin of the information (In Japanese) ;
http://d.hatena.ne.jp/sotarok/20080128/1201475353


thing2b added a comment - 10/Jun/09 02:36 PM

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.