Search code examples
phpxmldombenchmarkingxmlreader

How can I benchmark the XML parser of my choice?


I will handle a huge XML file and I will go with XMLReader. Below are three ways to go with, but I need to know which one is the fastest. How can I know this? The planet.xml file is located at http://trash.chregu.tv/planet-big.xml.bz2 in case hat you may need it. Thank you!


Solution

  • You might want to consider the PHP profiling extension:

    http://www.php.net/apd

    You can examine the results with pprofp:

    http://www.compago.it/php/phpckbk-CHP-21-SECT-3.html