Skip to content

Shared/Reusable Buffer For Block Checksums #112

@GGist

Description

@GGist

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions