[Typo3-dev] decrease memory usage

"Kasper Skårhøj" kasper at typo3.com
Sat Sep 6 13:17:13 CEST 2003


I read that copies of strings and arrays are just fine and faster than reference. But Objects - that should be faster with a reference. And I'm not the big reference-master I have to say. 

I would appreciate if someone reviewed AND TESTED the use of object references in TYPO3. Obvious places to start is:
 - t3lib_div::makeInstance() - should that be returning a reference?
 - Setting of $this->cObj, $this->pObj etc in various classes.



God bless

- kasper

*********** REPLY SEPARATOR  ***********

On 06-09-2003 at 10:30 Martin Kutschker wrote:

>From: René Fritz <r.fritz at colorcube.de>
>Date: Fri, 5 Sep 2003 16:32:33 +0200
>
>> Are there special things a PHP programmer can do to decrease memory
>> usage of scripts?
>
>Try avoiding copies of objects, use references whenever possible.
>
>It might help to use unset() either to destroy objects or to break the
>"binding" via a reference.
>
>But I am not a PHP guru. Coming from C the above ideas just sound natural
>to me ;-)
>
>Masi 
>
>_______________________________________________
>Typo3-dev mailing list
>Typo3-dev at lists.netfielders.de
>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev



God bless

- kasper


- kasper
-------------------- o ---------------------
>>>    In God I trust - others pay cash!     <<<
Check www.typo3.com







More information about the TYPO3-dev mailing list