[TYPO3-mvc] Your experiences with the memory consumption of extbase + improment suggestions?

Martin Kutschker masi-no at spam-typo3.org
Thu Feb 4 18:48:22 CET 2010


Franz Koch schrieb:
> 
> Do you have tricks to keep the memory usage low?

Get rid of cyclic object references before you unset/destroy an object using PHP 4.2 or 4.3 with
disabled garbage collection.

I found this tip recently on the Net and I could improve the memory situation by unsetting "parent
pointers".

eg if you have a tree and each node holds a reference of its parent unsetting the root node will NOT
free any menory. You have to walk the tree and unset the parent references before you do. Otherwise
PHP will not destroy the node objects. Note: unsetting the references in the destructor is too late.
You must call a custom destroy/shutdown() function that makes that cleanup for you. Really annoying.

So you can either upgrade up 4.3 and see if it makes a difference or fiddle with ExtBase.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list