2
0
mirror of synced 2025-02-24 14:48:27 +00:00

11 Commits

Author SHA1 Message Date
Matt Joiner
9a9c7dee00
Add and use typed roaring bitmap 2022-05-09 12:05:50 +10:00
Jonathan McDowell
a1a820d3c9
Avoid heap allocation in GetRequestablePieces (#734)
The calculation of whether we should ignore a piece in
GetRequestablePieces ends up doing an allocation for every piece, when
all we really need to do is query the index in the torrent. Provide an
IgnorePiece function instead, which avoids the need for a temporary
allocation.

Observed to cut out 40% of object allocations in some workloads (large
download, lots of seeds).
2022-04-11 14:22:05 +10:00
Matt Joiner
135f21fb64 Use interfaces to lazily expose the bare minimum inputs to GetRequestablePieces 2021-12-12 18:35:01 +11:00
Matt Joiner
67ed5d0032 Partition piece request strategy by storage capacity key 2021-12-12 16:56:01 +11:00
Matt Joiner
8e707c9b15 Remove unused peer stuff in request strategy 2021-11-29 10:14:16 +11:00
Matt Joiner
7d0be0ac65 Optimize chunk calculations in request strategy 2021-10-19 14:08:56 +11:00
Matt Joiner
1d2d1a9cde Store peer requests in a bitmap 2021-09-19 15:16:37 +10:00
Matt Joiner
21358ba458 Do peer requests separately for each peer 2021-09-18 20:34:14 +10:00
Matt Joiner
cfb23e271f Export request_strategy.GetRequestablePieces 2021-09-18 18:57:50 +10:00
Matt Joiner
2b443d695b Change torrent capacity to not return a pointer
It's an unnecessary complication for a storage implementer.
2021-09-15 23:33:17 +10:00
Matt Joiner
307d6d178f Prepare to implement max unverified bytes 2021-06-07 13:01:39 +10:00