cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Steiger" <lars.stei...@buzzard.ch>
Subject AW: ResourceReader and pdf
Date Wed, 01 Jan 2003 22:39:38 GMT
in my opinion - the perfect world would be if the interface
(SitemapOutputComponent) contains a method to get the content size or better
the method "shouldSetContentLength" (maybe renamed) returns the content
length or -1 if the size should not be set.

lars

> On Tuesday 31 December 2002 00:20, "Lars Steiger" wrote:
> > do you address the implementation of the
> "shouldSetContentLength true case"
> > inside CachingStreamPipeline ? or why do you mean, that it can
> cause memory
> > problems and cache congestion.
>
> Its a matter of the serializer only. If "shouldSetContentLength"
> is true, the
> whole result is written into a memory byte stream in order to get
> the content
> length which must be sent before the content (in a HTTP header, you know).
> Because PDF results can be quite large, this takes up quite some memory,
> and the repeated buffer expansion for the stream can cause additional
> problems due to memory fragmentation. If no content length has to be set,
> the result could be streamed to the client directly without much buffer
> reallocation and such.
> As for the possible cache congestion: if the large PDF result is
> cached, it
> may throw lots of small but often used items out of the cache,
> like GIF icons.
> I'm not sure how caching is handled if the result is directly
> streamed to the
> client, or if this changes once "shouldSetContentLength" is true and the
> result is sent as a single block. Is one of the developers reading this?



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message