[TYPO3-core] RFC: #11260: Feature: Speed up xml2array by adding a two level cache

Oliver Hader oliver at typo3.org
Thu Jun 4 11:05:04 CEST 2009


Hi Fabrizio,

Fabrizio Branca schrieb:
> Hi Olly
> 
>> Great patch! You already knew that... ;)
> 
> Thanks :)
> 
>> When the XML parser fails with an error message (e.g. "Line x: no
>> element found") that result can be in the runtime cache but should not
>> enter the database cache. Checking whether the result of
>> xml2arrayProcess() is an array should be enough here...
> 
> Why shouldn't even this be cached? Unless the xml does not change, even
> the errornous result won't change. And this should also be something
> that should be cached. If we would not cache this, we would spend alot
> of time in parsing this invalid xml over and over again. And if the xml
> will be corrected we'll get a new hash resulting in a new cache entry.

Hm, true... ;)

The faulty XML string to be parsed has to be changed to get a proper
array - and this results in a new hash. The only thing is
"XML_ERROR_NO_MEMORY" when the process ran out of memory for whatever
reasons...

olly
-- 
Oliver Hader
TYPO3 Release Manager 4.3


More information about the TYPO3-team-core mailing list