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

Sled serde #167

Closed
wants to merge 4 commits into from
Closed

Sled serde #167

wants to merge 4 commits into from

Conversation

alexsnaps
Copy link
Member

@alexsnaps alexsnaps commented Apr 19, 2023

This PR is broken down in a few steps:

  • Changed the key functions to work with bytes, rather than String - d5455da
    Still allocates on the heap, but avoids validating the UTF-8 sequences
  • Swaps out the JSON serialization for the binary Postcard one - ab3ed00
  • Fixes Infinispan by base64 encoding the binary keys - 3db3c09
  • Finally, reverted to String based JSON encoding for all storages other than the disk one - ca03986
    • This keeps backwards compatibility and avoids that dance with the Base64 encoding
    • On the flip side, the keys and counters occupy more memory in the backend service
With changing to [postcard](https://postcard.jamesmunns.com/), we get a 8% increase this scenario, which is the worst improvement. Others go up to ~15% improvement. A key is about 3x smaller in size. image

@eguzki
Copy link
Contributor

eguzki commented May 8, 2023

LGTM

@alexsnaps
Copy link
Member Author

Closed in favor of #178

@alexsnaps alexsnaps closed this May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants