clio icon indicating copy to clipboard operation
clio copied to clipboard

Don't use rippled JSON

Open cjcobb23 opened this issue 3 years ago • 5 comments

We use rippled JSON to serialize ledger objects and transactions to JSON. It's not used when users specify the binary flag. We should rewrite the rippled serialization to JSON code in clio and use boost JSON.

cjcobb23 avatar Dec 04 '21 00:12 cjcobb23

JSON serialization is actually quite slow. It can take tens of milliseconds to serialize 200 offers to JSON. We should see if Boost JSON speeds this up. If it doesn't, maybe we need to look into some sort of parallel deserializer, and possibly even cache deserialized JSON for a short time.

cjcobb23 avatar Dec 06 '21 18:12 cjcobb23

Is this still a thing @cjcobb23 ? i think we are using boost.json everywhere we can atm.? I'm closing this for now. Reopen if you think this issue still stands.

godexsoft avatar Nov 30 '22 21:11 godexsoft

No this is not done, we are still converting from binary to rippled JSON then to boost JSON

cjcobb23 avatar Nov 30 '22 21:11 cjcobb23

Ok, let's reopen then.

godexsoft avatar Nov 30 '22 22:11 godexsoft

It might be easier for us to adopt rippled JSON library than to do it the other way around. We will talk to rippled engineers about this in the future and decide together.

godexsoft avatar Jan 12 '23 14:01 godexsoft

Decided to not do this since we will have to implement the same logic in Clio. It's better to use existing library.

kuznetsss avatar Jun 25 '24 13:06 kuznetsss