You are here:  » MagicParser Benchmark. How to achieve optimal readings?


MagicParser Benchmark. How to achieve optimal readings?

Submitted by sirmanu on Fri, 2017-03-10 14:10 in

Hi David. Do you have bencharmarks or tests about the processing time of MagicParser script. For instance, time for reading each record?
Also, is any tip to improve this factor in gigas files?
Is XML or CSV faster?
Regards!

Submitted by support on Fri, 2017-03-10 14:23

Hi,

CSV will always be faster, as Price Tapestry is distributed with the "FASTCSV" build of MagicParser.php which reads the source file line by line and makes use of PHP's fgetcsv() function rather than reading the file character-by-character. This means that multi-line quoted text fields are not supported but I have never come across a requirement for this in 10 years of working with affiliate product feeds.

XML has to be processed as a stream (character by character) - there is no option; as XML feeds can (and often do) contain no new-line characters at all!

Cheers,
David.
--
PriceTapestry.com