boon icon indicating copy to clipboard operation
boon copied to clipboard

Performance issue

Open Crystark opened this issue 9 years ago • 3 comments

Hi,

While trying to find something that outperforms GSON, I found Boon and some pretty promising benchmarks: https://github.com/bura/json-benchmarks

I'm currently working on a web service that takes in alot of small (up to 100kb) JSON strings and needs to decode those to a POJO.

So right now with GSON I hit 55k QPS in my test environment and when I just switch from GSON to Boon, I only hit about 45k QPS.

I can't help but think i'm doing something wrong.

MyObject object = JsonFactory.fromJson(content, MyObject.class);
// MyObject object = gson.fromJson(content, MyObject.class);

I noticed the benchmark I linked up there uses the JsonFastParser which only deserializes to an Object unlike Jackson and GSON that deserializes to the actual Type which may be the reason why it outperforms them so much.

Am I missing something here to make it faster ? Thanks

Crystark avatar Jan 05 '16 11:01 Crystark

Send me your code, and I can help you.

JsonFactory.fromJson(content, MyObject.class);

The above is used for convenience.

RichardHightower avatar Jan 05 '16 18:01 RichardHightower

Hi,

I can't really give you any code without having to create some specific example code as it's part of a large app. You said the above was given for convenience so is there any other (and better) way to do this ?

I'll try to find some time to build a proper example but I may not be able to do that soon. Thanks

Regards

Crystark avatar Jan 06 '16 12:01 Crystark

https://github.com/RichardHightower/json-parsers-benchmark

On Wed, Jan 6, 2016 at 4:35 AM, Laurent [email protected] wrote:

Hi,

I can't really give you any code without having to create some specific example code as it's part of a large app. You said the above was given for convenience so is there any other (and better) way to do this ?

I'll try to find some time to build a proper example but I may not be able to do that soon. Thanks

Regards

— Reply to this email directly or view it on GitHub https://github.com/advantageous/boon/issues/9#issuecomment-169314694.

Rick Hightower (415) 968-9037 Profile http://www.google.com/profiles/RichardHightower

RichardHightower avatar Jan 07 '16 21:01 RichardHightower