Project

General

Profile

Actions

Task #2957

closed

Bug #2865: Reduce Keep server memory use

Review 2865-keep-memory-usage

Added by Tim Pierce almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Tim Pierce

Description

Review @ 70dd308

Eliminated ioutil.ReadAll, which was naively allocating buffers 2x as large as necessary.

  • Rewrote main.PutBlockHandler to allocate a buffer of exactly req.ContentLength bytes, and fill it with io.ReadFull.
  • UnixVolume.Read now uses ioutil.ReadFile to read the contents of a block file (which it should have been doing in the first place)
Actions

Also available in: Atom PDF