Vadim Gritsenko wrote: > > Hi Enke, > > > From: Enke Michael [mailto:[EMAIL PROTECTED]] > > > > Hi people, > > as we have a default Buffer of 8192 byte in the AbstractTextSerializer > > sometimes it takes very long until any result is visible in the > browser. > > It is configurable in the sitemap.xmap (or cocoon.xconf in latest CVS). > Use > <buffer-size>512</buffer-size> > parameter to specify buffer size you want.
ok > > > Therefore I introduced an "OutputFlusher" which flushes the > > BufferedOutputStream > > per default every 500 ms. Now the pageheader is shown immediately, > independent > > of how long it takes to fill 8192 byte. > > There is one issue with solution you are proposing: It uses one thread > per serializer in the system. It is not very efficient; better solution > is to use just one thread to manage all buffers. Such manager is already > implemented in the Avalon, class ActiveMonitor, and can be applied to > the monitoring multiple output streams. See avalon.excalibur.monitor > package. And this monitor already declared in the cocoon.xconf - so it > is ready to use. As I read the documentation for excalibur.monitor.StreamResource, there is written: "It can notify the change as soon as the Writer or OutputStream has been closed." But that is the point: I want to push the bytes to the browser (or the next component in the pipeline) even if the OutputStream is still open. Another Question would be: How to configure. Like This: <monitor> <thread priority="5" frequency="10000"/> <init-resources> <resource key="...<.W.H.A.T. .H.E.R.E.?>..." class="org.apache.avalon.excalibur.monitor.StreamResource"/> </init-resources> </monitor> > ... Regards, Michael --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]