[Zope-dev] Proposal for optimized Blob handling

Christian Theune ct at gocept.com
Wed Mar 7 11:44:09 EST 2007


Hi,

[modified slightly from a similar proposal to zope3-dev to match Zope
2's publisher]

I'm writing up a proposal for the ZODB to make even more efficient Blob
handling possible.

This includes not copying the data from an uploaded file, but using a
`link` operation when possible. 

However, the HTTPRequest class currently uses the default implementation
of the cgi module's FieldStorage.

I propose to create a small subclass to override the `make_file` method
to use `NamedTemporaryFile` instead of `TemporaryFile` to allow the file
being accessible from a filename so I can apply a `link` operation.

Notice: The FieldStorage explicitly provides the `make_file` method to
allow overriding in this sense.

Does anybody feel like this would be a bad idea?

Christian

-- 
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20070307/b6c0f1e1/attachment.bin


More information about the Zope-Dev mailing list