mysociety/alaveteli — pull request #1204 by mhl (2013-11-14 10:12:01+00:00)
Title: Reduce the memory used to serve /body/all-authorities.csv

On WDTK, /body/all-authorities was using lots of memory - this
commit reduces that by (a) fetching the public bodies in batches,
rather than keeping them all in memory at one time and
(b) writing the CSV to a file and then returning it with
X-Sendfile (or equivalent), rather than returning the whole file
from memory with send_data.

There's a FIXME to do with the layout of download directories; if
that's changed, the example nginx config, etc. will need to be
updated too.