From a081ad63d9af8686f1a383f168dfb79cbccfbf18 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 8 Dec 2014 21:57:13 -0600 Subject: [PATCH] Save memory by not pending chunks prematurely --- torrent.go | 1 - 1 file changed, 1 deletion(-) 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 { -- 2.48.1