You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jason Toy <ja...@gmail.com> on 2011/12/11 21:16:38 UTC

performance of json vs xml?

I'm thinking about modifying my index process to use json because all my
docs are originally in json anyway . Are there any performance issues if I
insert json docs instead of xml docs?  A colleague recommended to me to
stay with xml because solr is highly optimized for xml.

Re: performance of json vs xml?

Posted by Erick Erickson <er...@gmail.com>.
How are you getting your documents into Solr? Because
if you're using SolrJ it's a moot point because a binary
format is used.

I haven't done any specific comparisons, but I'd be
surprised if JSON took longer.

And removing a whole operation from your update
chain that had to be kept fed and watered is worth
the risk of a bit of slowdown.

In other words, "Try it and see" <G>...

Best
Erick

On Sun, Dec 11, 2011 at 3:16 PM, Jason Toy <ja...@gmail.com> wrote:
> I'm thinking about modifying my index process to use json because all my
> docs are originally in json anyway . Are there any performance issues if I
> insert json docs instead of xml docs?  A colleague recommended to me to
> stay with xml because solr is highly optimized for xml.

Re: performance of json vs xml?

Posted by Mark Miller <ma...@gmail.com>.
On Sun, Dec 11, 2011 at 3:16 PM, Jason Toy <ja...@gmail.com> wrote:

> I'm thinking about modifying my index process to use json because all my
> docs are originally in json anyway . Are there any performance issues if I
> insert json docs instead of xml docs?  A colleague recommended to me to
> stay with xml because solr is highly optimized for xml.
>


I'd make a big bet the JSON parsing is faster than the xml parsing.

And you have the cost of converting your docs to XML...

If you are too worried, do some testing. I'd simply use JSON. The JSON
support should be considered first class - it just came after the XML
support.

-- 
- Mark

http://www.lucidimagination.com