-
Notifications
You must be signed in to change notification settings - Fork 340
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
Evaluating dropping rapidjson #1107
Comments
Hi! Could you assign this issue to me? |
The new library seems to be working. However, there are some changes that I'd like to discuss. According to https://stackoverflow.com/questions/68105736/boost-json-serialization-format-boost-1-76-0 the Boost Json library outputs doubles in scientific notation. E.g.:
This should "not" be a problem as the JSON standard allows scientific notation, but I'm not sure if this can cause problems. Otherwise,I have to add a new function similarly to the one in https://www.boost.org/doc/libs/1_85_0/libs/json/doc/html/json/examples.html and manage doubles as before. |
Thanks for your work on the PR! Even if using scientific notation is valid in term of standard, I would not be surprised if quite a few users would choke on the output change. So yes I think we should aim at keeping the same "usual" notation as before. Especially if this is about coordinates, I don't think I've ever seen any service/file format using scientific notation for lon, lat. |
One nice thing about rapidjson is that it provides in output the exact same coordinates than what users provided in input. It may sound trivial but it's not obvious to me because the input coordinates are parsed, stored with floating point precision, then serialized again to output. I wonder how Boost.JSON behaves in that regard. |
Just updated the title to broaden the scope here as trying |
Results using a large (124MB) input file and the
I will test a little bit more boost json and if it does not improve I would suggest to pause/close this issue and reopen it when the |
@SebMilardo thanks again for the ongoing work on that! This last piece of feedback seems to confirm that 1. boost json is probably not what we want to switch to 2. As you suggest, I would keep this ticket open for reference, maybe closing #1129 if your further tests do no improve results. Additionally we could maybe keep an open draft PR with the |
Boost has its own JSON library, and I've heard that it's easier and more intuitive to use than rapidjson. Switching may not harm performance, provided we trust their benchmarks.
Add to this the fact that rapidjson is painfully
unmaintainedunversioned, maybe we should consider switching. Of course we'd have to evaluate that in the light of our use-case. The most demanding part for us is probably the parsing of huge matrices spitted out by routing engines.The text was updated successfully, but these errors were encountered: