adjust RA

This commit is contained in:
nikk gitanes
2022-05-25 12:39:34 +03:00
parent 50c0860b9b
commit 266fe0637f
2 changed files with 9 additions and 9 deletions

View File

@@ -255,9 +255,9 @@ func (c *Cache) getRemPieces() []*Piece {
readerPos := r.getReaderPiece()
readerRAHPos := r.getReaderRAHPiece()
end := r.getPiecesRange().End
count := int(16 * 1024 * 1024 / c.pieceLength * 5) // 80 MB
if count > 40 {
count = 40
count := int(16 * 1024 * 1024 * 4 / c.pieceLength) // 64 MB window
if count > 64 {
count = 64
}
limit := 0
for i := readerPos; i < end && limit < count; i++ {