[Typo3-dev] Memory consumption status / 8MB limits

Martin T. Kutschker Martin.T.Kutschker at blackbox.net
Thu Apr 1 10:05:21 CEST 2004


Kasper Skårhøj wrote:
> Hi Folks.
> 
> An update on the memory problems with the Extension Manager.
> 
> I have found that the problem is parsing of the scripts. The EM includes
> almost all of the huge classes in TYPO3 and apparently it now exits
> before it even begins to execute code.
> 
> There is apparently no way out of this, so I will now stop trying to
> find bad memory usage in the EM itself. The only thing I could find in
> there anyways is the array that picks up information about all the
> extensions - that becomes huge; some hundred kilobytes, but honestly
> that is nothing I haven't handled before...

I have played a bit with EM a while ago. IMHO many bytes are wasted 
because of the methods working on arrays (or parts of it). Instead of 
passing references around, whole arrays are copied and copied again. I 
don't think that PHP release memory that's allocated in such a way.

The other place EM uses perhaps more memory than others is it's huge 
output. Perhaps a few more bytes can be saved if it wouldn't try to 
aggregate it's output in on string. The simple solution is to output 
directly, more complex is trying to avoid unnecessary string copies and 
concatenations.

> Another reason for not caring about this problem anymore is that at
> other occasions the same problem happens. It is not only the Extension
> Manager nowadays that requires a lot of memory. I have experienced it in
> the frontend as well and I think there is now way around with big TYPO3
> applications.

Would a break down of the huge classes improve matters?

Masi





More information about the TYPO3-dev mailing list