Performance issues with JSON

12 views
Skip to first unread message

Rejoy Dominic

unread,
Apr 9, 2014, 2:23:10 AM4/9/14
to utter...@googlegroups.com
I have got a service in utterlyidle which works perfectly fine for html/text but if I use JSON is slows down considerably. In html/text it is less than 1 second and in JSON it is more than 10 seconds. Can any please advice on what can be the problem?

Daniel Worthington-Bodart

unread,
Apr 9, 2014, 4:07:23 AM4/9/14
to utterlyidle

Utterlyidle does not have any special support for either type so its probably down to how you are writing your JSON.

I'd recommend streaming it if it's a large response.

Instead of returning the json object from your resource, return a StreamingOutput or StreamingWriter then wire this directly into your JSON library.

If you still have problems try adding a BufferedOutputStream or BufferedWriter.

Let us know how you get on.

Dan

On 9 Apr 2014 08:23, "Rejoy Dominic" <rejoyd...@gmail.com> wrote:
I have got a service in utterlyidle which works perfectly fine for html/text but if I use JSON is slows down considerably. In html/text it is less than 1 second and in JSON it is more than 10 seconds. Can any please advice on what can be the problem?

--
You received this message because you are subscribed to the Google Groups "utterlyidle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to utterlyidle...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rejoy Dominic

unread,
Apr 10, 2014, 2:37:31 AM4/10/14
to utter...@googlegroups.com
Thank you, Dan!

It seems to be an issue with the JSON parser.
Reply all
Reply to author
Forward
0 new messages