[TYPO3-team-templavoila] Caching of xml2array during rendering
Niels Fröhling
niels.froehling at adsignum.com
Sat May 30 01:41:02 CEST 2009
Daniel Pötzinger wrote:
> Tolleiv Nietsch schrieb:
>> Hi,
>>
>> +1 - I like it, can't wait to see it in action ;)
>>
>> Maybe we should also try to find related situations in the backend
>> since XML2Array is a bottleneck there too.
>>
>> Regards,
>> Tolleiv
> What about to move the caching methods to a service API
>
> "datastructureAccess"
>
> with public (static?) methods like:
>
> tx_templavoila_datastructureAccess::getPageFlexData($uid);
> tx_templavoila_datastructureAccess::getTOFlexData($uid);
> tx_templavoila_datastructureAccess::getDSFlexData($uid);
> tx_templavoila_datastructureAccess::getTTContentFlexData($uid);
>
> thus this can be used from _pi1 as well as the backend.
>
>
>
> In TYPO3 4.3 it might be an idea to use the caching framework to general
> cache xml2array like
>
> function xml2array($xml)
> $cacheId=hash($xml);
> if ($xml2arrayCache->has($cacheId)) {
> return $xml2arrayCache->get($cacheID)
> }
>
> ...
Why does nobody think in reprogramming xml2array (and array2xml too), it's
such a horrible stack-copy algorithm, and you could help the entire T3, not only
TV. Every extension using flexforms!
Just simply looking at it, it can run x faster just using identical code and
references "&".
And if there is such an XML that makes xml2array a hot-spot, we should
integrate that into the test-set, so we can objectively verify performance-
improvements.
Ciao
Niels
More information about the TYPO3-team-templavoila
mailing list