[TYPO3-dev] Persistent USER and USER_INT objects

Dennis Cheung hkdennis2k at gmail.com
Sun Feb 26 02:30:36 CET 2006


Hi,

You may use non-tstemplate skills to result objects.

userFunc=tx_myext_wrapper_pi1->main

function main($content,$conf){
$realObject=tx_myext_pi::getInstance();
return $realObject->main($content,$conf);
}


But the overhead of creating new objects is not haevy.
The most heavy overhead I have found is LOCALLANG.PHP.

For very large language file(e.g. chc_forum), it may take 60ms~500ms
to include the php and do charset convertion.

BTW,
locallang.xml will has less impact. It does not require php
compiler/interpreper to load, and  it will cache on the xml, it can
take ~only 1ms for same language content.


Dennis

On 2/25/06, Mads Brunn <mads at typoconsult.dk> wrote:
> Hi Joey
>
> JoH wrote:
>
> > If you just want to store the result and reuse it, you could do something
> > like this:
> >
> > 10 = LOAD_REGISTER
> > 10 {
> >     tx_myextPi1.cObject = USER
> >     tx_myextPi1.cObject {
> >         userFunc = &tx_myext_pi1->main
> >     }
> > }
> >
> > 10 = TEXT
> > 10.data = register:tx_myextPi1
> >
> > 20 = TEXT
> > 20.data = register:tx_myextPi1
> >
> > Joey
>
> Yeah, I know but that's not the issue here. In this case I need to call
> a USER object a lot of times but with different parameters. I believe I
> could save some overhead by making the object persistent. You follow me?
>
>
> Best regards
>
> Mads Brunn
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>




More information about the TYPO3-dev mailing list