[Zope-dev] Streaming Response

Casey Duncan casey@zope.com
Wed, 16 Apr 2003 09:46:14 -0400


[snip]
> This could be useful for other stuff as well (except streaming large ob=
ject,
> 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 reviewe=
d=20
does
> including LocalFS which I have made a patch for).

Just FYI: Zope file objects are not completely loaded into memory when th=
ey=20
are accessed (and served). They are divided into 64K chunks in the ZODB=20
(where each chunk is an individual record). Files > 64k are streamed usin=
g=20
response.write() when they are served. Files smaller than that are served=
 all=20
at once.

-Casey