The Wayback Machine - https://web.archive.org/web/20220705175731/https://github.com/atomashpolskiy/bt/issues/134
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

bt.torrent.messaging.ExchangedMetadata.getSha1Digest should not allocate larger buffer than necessary #134

Open
atomashpolskiy opened this issue Dec 16, 2019 · 0 comments

Comments

@atomashpolskiy
Copy link
Owner

@atomashpolskiy atomashpolskiy commented Dec 16, 2019

Instead of always allocating a fixed size buffer (1,000,000 bytes currently), it should leverage the upfront knowledge of total size of the metadata and allocate Math.min(DEFAULT_BUFFER_LEN, metadata.length()).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment