Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue #9

Open
Crystark opened this issue Jan 5, 2016 · 3 comments
Open

Performance issue #9

Crystark opened this issue Jan 5, 2016 · 3 comments

Comments

@Crystark
Copy link

Crystark commented Jan 5, 2016

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

@RichardHightower
Copy link
Member

Send me your code, and I can help you.

JsonFactory.fromJson(content, MyObject.class);

The above is used for convenience.

@Crystark
Copy link
Author

Crystark commented Jan 6, 2016

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

@RichardHightower
Copy link
Member

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

On Wed, Jan 6, 2016 at 4:35 AM, Laurent notifications@github.com 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
#9 (comment).

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants