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: use msgpack #450

Merged
merged 14 commits into from
Feb 12, 2025
Merged

feat: use msgpack #450

merged 14 commits into from
Feb 12, 2025

Conversation

sfroment
Copy link
Member

For map and object you don't know what the values are.
So in reality if you take the example of the authorizedPeers it's a map containing Sets so it won't be serialized the way we want it if we don't make those recursive call.
Also we should go tail recursive on this one and each recursive call of this function otherwise we might encounter recursive stack limitation problem.
Will add unit test for this ASAP, but this nevertheless need to be merged,

Signed-off-by: Sacha Froment [email protected]

Signed-off-by: Sacha Froment <[email protected]>
Signed-off-by: Sacha Froment <[email protected]>
Signed-off-by: Sacha Froment <[email protected]>
Signed-off-by: Sacha Froment <[email protected]>
Signed-off-by: Sacha Froment <[email protected]>
Copy link
Member

@trungnotchung trungnotchung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@anhnd350309 anhnd350309 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@d-roak d-roak closed this Feb 11, 2025
@sfroment sfroment reopened this Feb 12, 2025
@sfroment sfroment changed the title fix: serialization of map and set need to be recursive as well feat: use msgpack Feb 12, 2025
Copy link

Flamegraph.com report

flamegraph.pprof
See in flamegraph.com

Created by Flamegraph.com Github Action

@d-roak d-roak merged commit 64ff132 into main Feb 12, 2025
14 checks passed
sfroment added a commit that referenced this pull request Feb 13, 2025
Signed-off-by: Sacha Froment <[email protected]>
Co-authored-by: hoangquocvietuet <[email protected]>
Co-authored-by: droak <[email protected]>
@sfroment sfroment deleted the fix/serialization branch February 17, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants