Write directly to response object instead of to an intermediate StringIO or memory when downloading/querying. This uses half the memory.