From: Matt Joiner Date: Wed, 4 Jan 2017 07:08:29 +0000 (+1100) Subject: Reduce the priority given to earlier pieces. Maximum priority reads at the end of... X-Git-Tag: v1.0.0~498 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=174cc0e183c07fe04e5acb50dbd44596f08e2e6b;p=btrtrc.git Reduce the priority given to earlier pieces. Maximum priority reads at the end of the file aren’t getting enough attention. --- diff --git a/connection.go b/connection.go index 01f75dd0..b1ab07f8 100644 --- a/connection.go +++ b/connection.go @@ -542,7 +542,7 @@ func (cn *connection) updatePiecePriority(piece int) { default: panic(tpp) } - prio += piece / 2 + prio += piece / 3 cn.pieceRequestOrder.Set(piece, prio) cn.updateRequests() }