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

Kasper Skårhøj kasper at typo3.com
Thu Apr 1 10:45:02 CEST 2004


On Thu, 2004-04-01 at 10:05, Martin T. Kutschker wrote:
> 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.

Not anymore. In fact I changed this behaviour to pass references
recently. At least in some cases. It didn't help. And now; If the
problem is the amount of included PHP classes anyways and that forces
people to raise limits there are no reason to waste time on such
improvements (with the following HIGH risk of bugs since passing arrays
by reference certainly opens such possibilities!)


> 
> 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.

Again, the EM is not important to optimize for speed. First of all it
must work.







More information about the TYPO3-dev mailing list