[Typo3-dev] Memory consumption status / 8MB limits
Martin T. Kutschker
Martin.T.Kutschker at blackbox.net
Thu Apr 1 18:51:37 CEST 2004
Kasper Skårhøj wrote:
> On Thu, 2004-04-01 at 10:05, Martin T. Kutschker wrote:
>
>>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!)
Sure. Switching to references needs care and a code re-review.
>>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.
The idea was not to gain speed, but reduce memory footprint. So that it
works on "any" server. No need to optimize EM more than the rest of
Typo3, but if the site runs with n MB, EM should not require n*2 MB. ie.
EMs memory consumption must be reasonable in relation to the Typo3
installation.
Masi
More information about the TYPO3-dev
mailing list