[Zope-dev] Proposal for optimized Blob handling

Christian Theune ct at gocept.com
Wed Mar 7 12:40:22 EST 2007


Am Mittwoch, den 07.03.2007, 09:34 -0800 schrieb Martin Aspeli:
> 
> 
> Christian Theune-2 wrote:
> > 
> > Am Mittwoch, den 07.03.2007, 14:01 -0300 schrieb Sidnei da Silva:
> >> What exactly do you mean by 'link'? As in 'soft links'? The uploaded
> >> file usually is a temporary file, so you are saying you would create a
> >> soft link on the 'blobs' directory to a file in the $TMP directory? Or
> >> maybe the other way around?
> > 
> > No, I'd create a new hard link into the blob directory so the link to
> > the temporary file can go away without making the inode go away. For the
> > purposes of storing blobs the TMP directory should be on the same
> > partition as the blobs directory anyway.
> > 
> 
> Does this work on Windows?

Link does not work on Windows using the link() function from the os
module.

I don't know whether Windows has any API for doing this kind of
operation.

In any case we can fall back (e.g. if the link() call fails) to copying
the data as this is just an optimization.

Please consider looking at my upcoming proposal for discussion.

In this thread I'd like to keep the focus on the change of the publisher
to use NamedTemporaryFile.

Christian

PS: Thanks for the input though.

-- 
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/c5707bb1/attachment.bin


More information about the Zope-Dev mailing list