[Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/trunk/src/zope/app/content_types - ported OFS.content_types from Z2 to Z3 (which is the most recent maintained code)

Janko Hauser jhauser at zscout.de
Mon Dec 12 17:44:10 EST 2005


Am 12.12.2005 um 21:34 schrieb Benji York:

> Andreas Jung wrote:
>> Log message for revision 40683:
>>   - ported OFS.content_types from Z2 to Z3 (which is the most  
>> recent maintained code)
>
> As a result of a recent sprint, ZC has a package (zope.mimetype)  
> that would probably be more useful to people interested in such  
> things.  I put it and another package that depends on it  
> (zope.file) into the .org repository as top-level projects today.

Reading with interest the code of zope.file I saw, that although the  
iterator is used for the delivery of the data, the data is first read  
into memory completly. Also the storage in the zodb is done as one  
big chunk. Actually it is copied twice before it is wrapped in the  
iterator.

	data = context.open("rb").read()
         self.headers += ("Content-Length", str(context.size)),
         self.body = bodyIterator(cStringIO.StringIO(data))

Is this done on purpose? Or is this implementation meant as a basic  
one, which will be replaced by something like a filesystem storage or  
the new zodb-blob support in the upcoming next version?

With regards,

__Janko




More information about the Zope3-dev mailing list