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

Record header checksum should be calculated without additional header srialization #206

Closed
ikopylov opened this issue Sep 15, 2022 · 0 comments · Fixed by #220
Closed

Record header checksum should be calculated without additional header srialization #206

ikopylov opened this issue Sep 15, 2022 · 0 comments · Fixed by #220
Assignees
Labels
enhancement New feature or request performance

Comments

@ikopylov
Copy link
Member

Currently, header checksum calculation calls serialization: https://github.com/qoollo/pearl/blob/master/src/record.rs#L240
We can improve the things by calculating the header checksum directly in to_raw function: in this function serialization can be called with 0 in header_checksum field, then CRC can be calculated on the serialized data, then the result can be written directly into serialized bytes vector by hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants