[Typo3-dev] XML vs. Serialized Arrays

Ries van Twisk typo3 at rvt.dds.nl
Thu Apr 7 18:19:18 CEST 2005


Bernard and others...

It saves me around 4 seconds of parsing time...
It went down from around 9 seconds...depending on the page to around 4.3 
seconds.... Amazing!

cheers,
Ries

> Hey Bernard,
>
> thanks for the tip!!!
> I'll try this myself today since I also have high parse times on my 
> site reaching at 9-10 seconds....
> I'll lett you know later today...
>
> cheers,
> Ries
>
>> Hallo list,
>>
>> I'm making an extension currently which makes heavy use of FlexForms 
>> (10-100 Fields in each sheet,
>> 1-10 sheets)
>>
>> It is clear that the larger the DS and the corresponding Data XML 
>> gets the longer it takes to parse
>> them.
>>
>> So I inserted
>> $start = microtime()
>> statements at the beginning and end of t3lib_div::xml2array and 
>> array2xml to check how long those
>> functions take ....
>>
>> I then replaced the xml2array and array2xml functions with calls to 
>> serialize and unserialize:
>>
>>
>> Here are some numbers:
>>
>> Initializing the DS and Data XML by my selfwritten Ext:
>> Traditional: 7.85sec
>> Serialize: 1.817sec (here are still some/few traditional XML included)
>>
>> Initializing the Data values via TCE Forms
>> Trad: 2.685sec
>> Ser: 0.059sec
>>
>> Loading my selfwritten Ext which displays the Flexform:
>> Trad: 0.98sec
>> Ser: 0.020sec
>>
>> Saving
>> Trad: 7.93sec
>> Ser: 0,077sec
>>
>>
>>
>> Is there any plan to make a checkbox in the Install Tool: ( ) Fast 
>> FlexForms ???
>>
>> I know this would make it very bad to debug FlexForms but this is 
>> nothing the normal User does.
>> (Normally just devlopers look at the generated XML)
>>
>> A solution to the problem of "editability" could be that you just 
>> deserialize and orig_array2xml the data
>> for editing and afterwards orig_xml2array and serializ it.
>>
>>
>>
>> greets,
>> Bernhard
>
>
>
>


-- 
R. van Twisk
http://www.metamorf.net

Our Typo3 enabled website: http://www.livetravelguides.com
Instand help for Typo3?    irc:/irc.freenode.net/typo3
Looking for documentation? http://typo3.org/documentation/






More information about the TYPO3-dev mailing list