[TYPO3-team-templavoila] Caching of xml2array during rendering

Steffen Kamper info at sk-typo3.de
Sat May 30 16:35:04 CEST 2009


Hi Niels,

Niels Fröhling schrieb:
> Steffen Kamper wrote:
> 
>> and look to my comment - i also start doing this (without any promise)
> 
>  Well, maybe this helps you:
> 
> http://www.zend.com//code/codex.php?ozid=982&single=1
> http://gaarai.com/2009/01/12/convert-xml-to-associative-array-in-php/
> http://gaarai.com/wp-content/uploads/2009/01/xmllibphp.zip
> 
>  It actually does the xml2array-code without stack-copy and the wrong 
> solution over xml_parse_into_struct, and directly registers 
> node-handlers. I heard simpleXML isn't cool with namespaces, so maybe 
> you stay with the regular parser. Another thing is that you maybe carry 
> around the parser for some time instead of instanciating him every time 
> again.
> 
>  Another thing I encountered often was the Pear XML_Serializer:
> 
> http://pear.php.net/package/XML_Serializer/redirected
> http://www.sitepoint.com/article/xml-php-pear-xml_serializer/1/
> 
>  It appears as easy as like "unxmlize()". :) If that would be true I 
> doubt a "unserialize()" could be any faster, but well you have to 
> profile it anyway.
> 
>

thanks. I also looked arround, and the methods you linked to are not 
what i prefer.
Have a look to this slides from one of the php-devs:
http://www.slideshare.net/tobyS/xml-and-xpath-with-php

It's clear that XMLReader is the one prefered as it's the only way to 
stream the data without loading complete xml to memory.

   Okay, this is now completely off-topic.
> 

i don't consider this as off-topic as the caching is one side, the 
optimizing of xml2array is the main reason for this patch :)

vg Steffen


More information about the TYPO3-team-templavoila mailing list