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

Avoid cloning blob content. #3055

Merged
merged 3 commits into from
Dec 19, 2024
Merged

Avoid cloning blob content. #3055

merged 3 commits into from
Dec 19, 2024

Conversation

afck
Copy link
Contributor

@afck afck commented Dec 18, 2024

Motivation

It's not necessary to clone the blob content just to hash it.

Proposal

Change BcsHashable to not require DeserializeOwned, so that BlobBytes can borrow the bytes.

There were also a few other places where they were unnecessarily cloned.

Test Plan

CI should catch regressions.

Release Plan

  • Nothing to do / These changes follow the usual release cycle.

Links

Copy link
Contributor

@ma2bd ma2bd left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link
Contributor

@ndr-ds ndr-ds left a comment

Choose a reason for hiding this comment

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

Nice! Much better

@afck afck merged commit 2df1618 into linera-io:main Dec 19, 2024
23 checks passed
@afck afck deleted the blob-content branch December 19, 2024 09:28
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.

3 participants