Skip to content

Commit

Permalink
Merge pull request #704 from SiaFoundation/chris/reduce-download-memory
Browse files Browse the repository at this point in the history
Reduce ram used when downloading lots of small files
  • Loading branch information
ChrisSchinnerl authored Nov 1, 2023
2 parents 841b78a + e69451b commit 50f7038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worker/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ func (d *downloader) execute(req *sectorDownloadReq) (err error) {
}()

// download the sector
buf := bytes.NewBuffer(make([]byte, 0, rhpv2.SectorSize))
buf := bytes.NewBuffer(make([]byte, 0, req.length))
err = d.host.DownloadSector(req.ctx, buf, req.root, req.offset, req.length)
if err != nil {
req.fail(err)
Expand Down

0 comments on commit 50f7038

Please sign in to comment.