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

Cosmos: Modernize our JSON serialization/deserialization #34567

Open
roji opened this issue Aug 29, 2024 · 1 comment
Open

Cosmos: Modernize our JSON serialization/deserialization #34567

roji opened this issue Aug 29, 2024 · 1 comment

Comments

@roji
Copy link
Member

roji commented Aug 29, 2024

Our Cosmos deserialization is currently based on using Newtonsoft.Json to deserialize to DOM JTokens, which are then e.g. processed by our shapers. We should take a look at the entire approach here and decide what to do; at the very least, we should consider moving from Newtonsoft.Json to System.Text.Json - using Newtonsoft.Json notably means that deserialization happens synchronously (its JsonSerializer doesn't support async).

To improve performance, we could go all the way and stop serializing/deserializing to DOM types altogether, and use low-level parsing directly from UTF8, like we already do in relational.

@AndriySvyryd
Copy link
Member

To improve performance, we could go all the way and stop serializing/deserializing to DOM types altogether, and use low-level parsing directly from UTF8, like we already do in relational.

Yes and #14570

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

No branches or pull requests

3 participants