-
Notifications
You must be signed in to change notification settings - Fork 8
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
Prototype jsoniter decoding #37
Comments
Here is derivation of codec that parses and serializes a bid request from OpenRTB 2.5. Here is an example, provided by @atais, for a custom codec which extracts the message part that can be optionally encoded as a JSON string. Please also check results of |
Hey @plokhotnyuk it is interesting. As you may know we are also managing protobuf and openrtb extensions, so we may need to adapt your examples a little bit. |
@valdo404 Please try and leave your feedback here. I can help with review, profiling and tuning. |
@valdo404 we have implemented full open rtb support, meaning encoding and decoding, with jsoniter. From my experience/point of view you can't just generate the whole model based on case classes, but it depends on the approach :) Anyway, jsoniter is a lot faster than circe. I did not know of this project existence so let me check if we could benefit from each other's work :) |
Thanks atais. the interesting thing here is that we provide compatibility with protobuf and ssps as well (like bidswitch). |
@valdo404 just fyi we did not realize there is a google protobuf project available 😞 and we simply recreated the whole OpenRTB model from the IAB specs. So, god damn, our parsers are for sure not compatible with that model. We are not using protobuf extensions either, so our way is completely different. Still, I am curious how jsoniter performs against jackson - available here: We will have a look into google model, which could give us more flexibility and reduce our codebase, but I need some time. Tbh it is not a top priority. I could help you with the parsers as well if you start writing them since we have spent some pleasant time with jsoniter ;) |
Guys it is hard to beat scalapb project (especially because protobuf is very compact and requires less memory allocs) |
@atais scala openrtb is based on google openrtb project since it is relying on same .proto files. |
@valdo404 just quick note on circe vs jsoniter decoding performance We have both circe and jsoniter serde and this is the benchmark:
so its ~3x difference, which for us was a huge benefit. |
Instead of relying on circe try jsoniter for fun and profit
https://plokhotnyuk.github.io/jsoniter-scala/
The text was updated successfully, but these errors were encountered: