News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Bas De Nooijer's Blog:
Benchmarking PHP Solr response data handling
March 02, 2012 @ 09:08:03

On his blog Bas De Nooijer has put together some PHP Solr benchmarks around a few different ways to handle the response data.

Solr supports multiple output formats. Some are for general use (xml, json) and some are even language specific. If you're using PHP these are the most logical response writer formats: xml, json, phps (serialized php), php (php code to execute). On top of that PHP offers multiple ways to parse XML. I'm benchmarking these options to determine the most efficient decoding to implement in the next major version of Solarium, but the results should be useful for any PHP Solr implementation.

He includes a snippet of code he's using to generate the benchmarks, a PHPUnit test that pulls in two different json-based results and, for now, just runs a json_decode on it. You can see the results of his testing here, graphing out the different response handling methods and their time (in milliseconds) to parse the response. It's interesting to see that there's a direct relation to the size of the data set and how long it takes for the methods to execute.

The current code for his benchmarks is available over on github

0 comments voice your opinion now!
solr response handling solarium benchmark


blog comments powered by Disqus

Similar Posts

L2Admin.com: Battle of the server side scripting languages - Perl, Python & PHP

Community Crosstalk: Matthew O'Phinney & Scott Johnson on Dynamic Function/Method Calls

Rob Allen's Blog: PHP 5.3 is quicker than PHP 5.2

Alexander Netkachev's Blog: PHP coding tip: Convert notices and warnings into Exceptions

Gregory Szorc's Blog: PHP Now Using Proper HTTP Status Codes on Error


Community Events





Don't see your event here?
Let us know!


voicesoftheelephpant introduction community composer version framework podcast conference interview opinion language security list library release tool series symfony laravel artisanfiles

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework