[Zope-dev] Streaming Response
Johan Carlsson [EasyPublisher]
johanc@easypublisher.com
Thu, 24 Apr 2003 13:15:33 +0000
At 09:04 2003-04-24 -0400, Casey Duncan said:
> >
> > Deactivating *every* block looks like a bad idea. This defeats the
> in-memory
> > cache that will be a big win for small files.
>
>I agree.
>
> > The memory cache is only a disadvange if your files are large enough that
>they
> > have enough chunks to disrupt LRU cache policy. How about comparing the
> > number of chunks to a fraction of the cache target size?
>
>I think possibly a better solution is to have an explicit switch on the file
>like "Disable ZODB caching (recommended for large files)" so that it can be
>decided as policy on a case-by-case basis.
In the case of the explicit configuration option, wouldn't it be good to
use a file-based caching mechanism instead?
In other word write the unpickled blocks to a cache file and stream that
file to the response.
I'm not sure what the overhead for reading data from the ZODB is, but
I suspect streaming large files could be a bottle neck.
Cache-files could be removed when the database is flush or packed.
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