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

feat: Zero-copy deserialization #507

Open
HenningHolmDE opened this issue Jun 17, 2024 · 0 comments
Open

feat: Zero-copy deserialization #507

HenningHolmDE opened this issue Jun 17, 2024 · 0 comments
Labels
chore Reduction of technical debt enhancement New feature or request

Comments

@HenningHolmDE
Copy link
Contributor

Currently, during deserialization, data is always copied from the deserializer when deserializing into a Cow, which always results in a Cow::Owned, thus copying the data.

There seem to be ways to mitigate this (e.g. using #[serde(borrow)] or introducing serde_with::BorrowCow). When I tried this out briefly, I ended up sprinkling borrow all over the place, not sure, if this is actually required.

Also, adding validation to the deserialization through try_from seems to have complicated things to be less straightforward.

I'm sure there is some good way of doing this optimization.

@duesee duesee added enhancement New feature or request chore Reduction of technical debt labels Jun 17, 2024
@duesee duesee added this to the 12. Python bindings milestone Jun 26, 2024
@duesee duesee removed this from the 12. Python bindings milestone Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Reduction of technical debt enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants