cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Defining Source Interfaces
Date Wed, 08 Jan 2003 09:01:52 GMT
Carsten Ziegeler wrote:

>Sylvain Wallez wrote:
>>However, I still consider the new implementation of 
>>SourceResolverImpl.release() in Excalibur (dated 15 dec. and not 
>>currently in Cocoon) to be a performance burden since in most cases all 
>>component-related operations it performs *will be useless*.
>>Carsten, what do you think ? Should we move this to avalon-dev or can 
>>you wear you Avalon hat here ?
>I'm glad that you wrote hat and not hate... (just a hint of a joke).

Wow, this kind of typo must absolutely be avoided ;-)

>The implementation currently used in Cocoon is wrong. The new version i 
>Avalon is IMHO cleaner and correct, because a factory is responsible
>for creating a source, so it must be the responsibility of exactly this
>factory to pool/destroy/recylce the source as well. It cannot be
>the source resolver doing the job.
>Where do you see the performance problems?

The performance problem is that among all implementations of Source that 
I know of (URLSource, FileSource, SlideSource, BlobSource, XMLDBSource, 
SitemapSource and CVSSource), only one actually needs to be disposed 

So having a isSelectable()-select()-release() cycle to call a 
factory.release() that does nothing most of the time seems CPU waste to me.

Now I agree that theoretically releasing is the factory's job. So, in 
order to lower my performance fears, what about removing the 
isSelectable() call in SourceResolverImpl.release() ? It would remove an 
unnecessary search in the ServiceSelector HashMaps, considering also 
that the select() that follows this isSelectable() is surrounded by a 


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

To unsubscribe, e-mail:
For additional commands, email:

View raw message