PHP optimizations (was: [Typo3-dev] decrease memory usage)

Martin Kutschker Martin.T.Kutschker at blackbox.net
Tue Sep 9 15:22:47 CEST 2003


From: Kasper Skårhøj <kasper at typo3.com>
Date: Tue, 09 Sep 2003 12:12:12 +0200

>> Note: this is of course true for the upcoming encoding functions.
>> iconv/recode and mbstring should IMHO be favoured for self written
>> PHP functions. There's no need to reinvent the wheel anyway.

> I rely first and foremost on my own functions for one single reason:
> I know it will work on all platforms regardless of PHP extensions etc.
>
> My idea is that we can change the class internally to use native
> functions if they are available (recode, iconv, whatever).

Or create alternate classes with the same methods (think of it as an interface). On "script startup" the appropriate class will be instantiated as a global encoding class.

Another idea would be to use a cached version of (generated) code just like with "tables.php".

Probably we can make it user configurably which version to choose (guided by the installer).

> If someone wants to work on this they are welcome. Probably I will
> spend my time on something else as long as my own functions work

I am volunteering.

>> # Tune your database and index the fields that are commonly used in
>> your SQL WHERE criteria.
>
> Someone, help me.

If I notice something I'll report.

>> Not mentioned here, but in such a large application like Typo3 it
>> could make a difference: use single quotes instead of double quotes
>> if you don't need variable interpolation.
>
> Which is in fact in the coding guidelines already.

Could anybody point me to the relevant section? I couldn't find it. But I found a TODO item for the extension evaluater.

Regards,
Masi 





More information about the TYPO3-dev mailing list