Writing large files into GS export contexts hogs RAM

Bug #257365 reported by Tres Seaver on 2008-08-12
Affects Status Importance Assigned to Milestone
Zope CMF

Bug Description

'Products.GenericSetup.interfaces.IExportContext' has a method,
'writeDataFile', which cannot be efficiently implemented for large
files: it requires that the content of the file be in memory as a string.

Some contexts might be able to support a more efficient pattern,
returning a file handle (or file-like object) which can be used for chunked
writes. The attached patch allows such contexts to implement a new
interface, 'IChunkedExportContext', which offers a new API, 'openDataFile'.

It also implements that interface for DirectoryContext.

Tres Seaver (tseaver) wrote :
Changed in zope-cmf:
status: New → Fix Committed
Jens Vagelpohl (dataflake) wrote :

No need to wait with the "fix released" status, this is on the trunk and will be released eventually.

Changed in zope-cmf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers