On 6/26/07, Yonik Seeley <[EMAIL PROTECTED]> wrote:
On 6/26/07, Jérôme Etévé <[EMAIL PROTECTED]> wrote:
> I'm currently running some tests with solr on a small index and I
> noticed a big difference on the response time of queries depending on
> the use of XML or json as a response format.
> In average, my test queries (including http connections open and close
> ) takes 6 ms to perform when I ask for XML and they take 30 ms when I
> ask for JSON.
Wow, that's a surprise.
The only thing I can figure is that perhaps during the string escaping
the JSON writer is writing to the stream character-by-character.
Could you try the python writer and see if there is a speed
difference? It uses a StringBuilder when escaping the string.
I just tried the python writer and it's as fast as XML is. I'm still
looking at the code trying to point out the reason of that.
Thanks for any help.
J
--
Jerome Eteve.
[EMAIL PROTECTED]
http://www.eteve.net