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

Node should re-use instances of hash.Hash by using a sync.Pool #5850

Open
fasmat opened this issue Apr 15, 2024 · 0 comments
Open

Node should re-use instances of hash.Hash by using a sync.Pool #5850

fasmat opened this issue Apr 15, 2024 · 0 comments

Comments

@fasmat
Copy link
Member

fasmat commented Apr 15, 2024

Description

This issue came up in a discussion here: #5784 (comment)

Every time the node hashes data it re-instantiates hash.Hash objects, which is slow and can be mitigated by using a sync.Pool.

Affected code

An example would be here:


Other places where instances of hash are created should also be checked to be re-used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Next
Development

No branches or pull requests

1 participant