cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <>
Subject Re: Performance with blocks protocol
Date Thu, 02 Nov 2006 23:47:06 GMT
Alexander Klimetschek skrev:
> Hi Daniel,
> we are noticing that the blocks protocol is currently quite slow. We did 
> not yet got a proper profiling setup, so I am asking if you know what 
> the bottlenecks might be and how to resolve them.

While I have not optimized the code there is no obvious bottlenecks 
except for that XML output (and input) should be done with SAX in some 
cases, so that we get rid of the serialization followed by parsing  step.

Calling blocks should nopt be more than some minimal overhead so I would 
guess that there is something unintended that happen.

Profiling would probably be the easiest way to find out where the 
bottleneck is.

> One thing might be the logging of all requests and apart from commenting 
> them out I did not manage to turn them off, since they use the 
> servletcontext logger and I don't know how to configure that one 
> specifically to be more silent.

The use of the servlet context logger is a leftover from before, when 
component setup was much more complicated and done within Cocoon. Then I 
needed to minimize component requirements within the blocks fw. Now when 
the components are setup already in a servlet context listener that is 
not a problem anymore and the code should be changed to the ordinary logger.

> And when using the blocks-protocol together with cforms in the 
> "backend"-block, we quickly get java.lang.OutOfMemory errors (when 
> opening or reloading a form about 10 times). It looks like some 
> continuations are still open, but can it be that they are much larger in 
> the blocks case?

I don't find any reasons for that they should be larger in the blocks 
case. Again profiling would give some clues.

One possibility is that there is some fault in the component handling so 
that the block servlet component or tree processor is recreated instead 
of reused in some cases.

> Or am I doing something terribly wrong? The 
> continuation request is passed on to the super-block via an URI that 
> contains all request params (via that InputModule I talked about) and 
> then the continuation is called inside that block.

Don't seem like something that should be a problem.


View raw message