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 (SitemapSource).

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 try/catch.

Sylvain

--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to