cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: [PATCH] [1.8] Optional profiler, and fixes for overzealous synchronization
Date Fri, 25 Aug 2000 10:16:42 GMT
Robin Green wrote:
> Oops. With the attachment this time.
> Four patches in one here. More coming this weekend hopefully (but I always
> say that, and never deliver... :)
> 1. The cocoon 1.8-dev pipeline is now essentially single-threaded (per
> Engine, which means per servlet context). This was added with the blocking
> changes in the latest version of, but it doesn't make sense. The
> new system of blocking per page should be quite adequate for efficiency - no
> need to hold up a whole site because of one slow page (perhaps a page which
> gets data from an external source) - and in fact blocking a whole site makes
> blocking individual pages totally redundant, so it doesn't make sense in
> that way either.
> 2. Synchronization on wait() and notify() isn't a pointless bureaucratic
> demand - it is explictly required because it requires a little bit of
> thought. Synchronization is meant to be wide enough to prevent missed
> notifications - and in the case of inner class Block a missed notification
> could occur, causing a hang on a request. Imagine that the lock method was
> called, and a context switch (i.e. switch to another thread) occured on the
> line
>                 System.err.println( "Blocking: " + key );
> whereupon another thread removed the key and called notifyAll(). In this
> scenario the first thread would miss the notification and would block
> forever. (Of course, the bug mentioned above means that this bug would never
> occur in the current release.)
> 3. The profiler class (in attached can be used to record the
> time taken by each class in the pipeline for any request. A very simple
> samples/profiler/profiler.xml and profile.xsl (in attached zip) can be used
> to view the results. The profiling is off by default, and can be enabled by
> uncommenting
> #profiler.enabled=true
> in the (updated) file. Obviously, it needs to
> be modified, as below, for it to be able to record.
> We have found it quite useful to see the length of time taken by each stage
> - it seems that a stylesheet with a linear-to-tabular conversion (i.e.
> splitting into blocks of 5) and with an xsl:import takes 2.5 seconds - as
> opposed to 0.5 seconds for a standard stylesheet - on our very slow test
> machine. Now to find out which of those is causing the difference!
> NOTE: Feel free to change the com.itao.xml packagename for DOMWriter.
> 4. Rationalisation of global and request options in A couple of
> people have requested to turn off the VERBOSE option without rebuilding
> Cocoon. Well now you can - and you can control it per request, as well.

These sounds all great patches.

I'm confident you'll get voted in so I'll simply wait for you to add
those patches yourself.

I told you I'm a lazy butt :)

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------

View raw message