[Zope-dev] Streaming Response

Johan Carlsson [EasyPublisher] johanc@easypublisher.com
Wed, 16 Apr 2003 14:02:06 +0000


At 09:46 2003-04-16 -0400, Casey Duncan said:
>[snip]
> > This could be useful for other stuff as well (except streaming large 
> object,
> > which should never be saved in the ZODB by the way, be cause it bloats the
> > memory when the object is loaded. It should be stream from a file, and not
> > by reading the entire file as most file system object product I reviewed
>does
> > including LocalFS which I have made a patch for).
>
>Just FYI: Zope file objects are not completely loaded into memory when they
>are accessed (and served). They are divided into 64K chunks in the ZODB
>(where each chunk is an individual record). Files > 64k are streamed using
>response.write() when they are served. Files smaller than that are served all
>at once.
>-Casey

But isn't it un-pickled into memory?

I did some work on this last year (for 2.4 or something) and in my tests
Zope hang quite effectively when using regular File Objects.
But streaming from a file on the file system did work every time.

I tried this on a 200MB video clip and the client was Microsoft MediaPlayer.

Have anything change in resent Zope releases?

Best Regards,
Johan Carlsson


-- 
Easy Publisher Developers Team
Johan Carlsson
johanc@easypublisher.com

Mail:
Birkagatan 9
SE-113 36  Stockholm
Sweden

Phone +46-(0)8-31 24 94
Fax +46-(0)8-673 04 44
Mobil +46-(0)70-558 25 24
http://www.easypublisher.com