[Zope3-dev] Proposal for optimized Blob handling

Christian Theune ct at gocept.com
Thu Mar 8 10:21:37 EST 2007


Am Donnerstag, den 08.03.2007, 01:30 -0300 schrieb Sidnei da Silva:
> On 3/7/07, Christian Theune <ct at gocept.com> wrote:
> > 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.
> 
> Since you're proposing to replace TemporaryFile anyway, and your
> 'os.link()' proposal requires that both the file and the hard link are
> on the same 'drive' or 'partition' or whatever, why not create the
> temporary file on a temp directory that is close (hopefully a sibling)
> of the final destination blob directory, then you can be sure that
> 'os.link()' will work and will be 'O(1)' without any extra effort.
> 
> Is there any reason not to do that?

Admin-Choice. You can already configure this directory to be on the same
destination by setting your tempdir environment accordingly.


-- 
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/zope3-dev/attachments/20070308/82ee0256/attachment.bin


More information about the Zope3-dev mailing list