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

Shared/Reusable Buffer For Block Checksums #112

Open
GGist opened this issue Jul 21, 2017 · 0 comments
Open

Shared/Reusable Buffer For Block Checksums #112

GGist opened this issue Jul 21, 2017 · 0 comments
Labels

Comments

@GGist
Copy link
Owner

GGist commented Jul 21, 2017

Currently, during the download of a torrent users will see spikes in memory usage equal to the block size of each torrent every once in a while. This is due to the fact that we just allocate some buffer on the fly (https://github.com/GGist/bip-rs/blob/master/bip_disk/src/disk/tasks/helpers/piece_checker.rs#L53) which has a size equal to the piece length.

With a 2MB piece length, this will spike process usage exactly 2MB (for that torrent), which is less than ideal.

@GGist GGist added the bip_disk label Jul 21, 2017
@GGist GGist mentioned this issue Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant