This website requires JavaScript.
Explore
Help
Sign In
status-im
/
torrent
Watch
2
Star
0
Fork
0
You've already forked torrent
mirror of
synced
2025-02-24 06:38:14 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
torrent
/
request-strategy
/
torrent.go
7 lines
97 B
Go
Raw
Normal View
History
Unescape
Escape
Prepare to implement max unverified bytes
2021-05-14 11:50:41 +10:00
package
request_strategy
Use interfaces to lazily expose the bare minimum inputs to GetRequestablePieces
2021-12-01 19:21:25 +11:00
type
Torrent
interface
{
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 05:22:05 +01:00
IgnorePiece
(
int
)
bool
Use interfaces to lazily expose the bare minimum inputs to GetRequestablePieces
2021-12-01 19:21:25 +11:00
PieceLength
(
)
int64
Prepare to implement max unverified bytes
2021-05-14 11:50:41 +10:00
}
Reference in New Issue
Copy Permalink