From f6472fc1fd91f636c187e90e94680c2de12a3204 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 20 Feb 2016 14:41:04 +1100 Subject: [PATCH] Code comment --- torrent.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/torrent.go b/torrent.go index eeab1a63..7d9c59b6 100644 --- a/torrent.go +++ b/torrent.go @@ -917,6 +917,8 @@ func (t *torrent) byteRegionPieces(off, size int64) (begin, end int) { // Returns true if all iterations complete without breaking. func (t *torrent) forReaderOffsetPieces(f func(begin, end int) (more bool)) (all bool) { + // There's an oppurtunity here to build a map of beginning pieces, and a + // bitmap of the rest. I wonder if it's worth the allocation overhead. for r := range t.readers { r.mu.Lock() pos, readahead := r.pos, r.readahead -- 2.48.1