cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: Cocoon running modes (was Re: Error Handling is NOT working)
Date Thu, 12 Sep 2002 14:11:48 GMT
Sylvain Wallez wrote:
> I agree that Cocoon is not a servlet, but disagree with your conclusion
> : the environment implementation makes the bridge with the actual
> running environment. In the servlet environment, the Response is just a
> thin wrapper around the HttpServletResponse and the output stream is the
> HttpServletResponse's output stream which *is buffered* by the servlet
> engine, as stated by the servlet spec.
>
> So can't we extend the Environment contract by saying that the output
> stream should be buffered, and providing a new setBufferSize() method ?
>
> This will avoid useless and inefficient double-buffering in servlet
> environment (which is the one mostly used and where perfs and memory are
> critical), and, making the command line environment buffered should be a
> couple of lines in AbstractCommandLineEnvironment.
>
> We can thus have an environment-neutral Cocoon that relies on a buffered
> output stream provided by the environment, regardless what this
> environment is.
>
Again, this extra buffering is already implemented in the
AbstractTextSerializer
and as HTML or XML are the most uses of Cocoon, the output is buffered
already
today regardless of the servlet engine, cli or whatever environment you use.

So shifting this from the serializer to the environment does not reduce
performance but solves the problem.

I just have finished a simple solution - we can decided on the
implementation
if it's ok, or we should search for a different solution.

Carsten


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


Mime
View raw message