From 1d54b1c6d87a8a0addb9cc353b830e9c659ee0ae Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 1 Feb 2017 16:28:16 +1100 Subject: [PATCH] Massively reduce CPU when Readers are blocked on unavailable data --- reader.go | 1 - t.go | 1 - 2 files changed, 2 deletions(-) diff --git a/reader.go b/reader.go index 999bd70d..b73b8bad 100644 --- a/reader.go +++ b/reader.go @@ -98,7 +98,6 @@ func (r *Reader) tickleClient() { func (r *Reader) waitReadable(off int64) { // We may have been sent back here because we were told we could read but // it failed. - r.tickleClient() r.t.cl.event.Wait() } diff --git a/t.go b/t.go index 8454d02b..ed810a5f 100644 --- a/t.go +++ b/t.go @@ -36,7 +36,6 @@ func (t *Torrent) NewReader() (ret *Reader) { t: t, readahead: 5 * 1024 * 1024, } - ret.pieces = ret.piecesUncached() t.addReader(ret) return }