From: Matt Joiner Date: Tue, 9 Dec 2014 03:57:13 +0000 (-0600) Subject: Save memory by not pending chunks prematurely X-Git-Tag: v1.0.0~1400 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=a081ad63d9af8686f1a383f168dfb79cbccfbf18;p=btrtrc.git Save memory by not pending chunks prematurely --- diff --git a/torrent.go b/torrent.go index 884d23da..891e0060 100644 --- a/torrent.go +++ b/torrent.go @@ -227,7 +227,6 @@ func (t *torrent) setMetadata(md metainfo.Info, dataDir string, infoBytes []byte util.CopyExact(piece.Hash[:], hash) t.Pieces = append(t.Pieces, piece) piece.bytesLeftElement = t.IncompletePiecesByBytesLeft.Insert(index) - t.pendAllChunkSpecs(pp.Integer(index)) } t.assertIncompletePiecesByBytesLeftOrdering() for _, conn := range t.Conns {