avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject RE: Performance questions about ECM
Date Fri, 08 Mar 2002 13:41:07 GMT


> From: Vincent Massol [mailto:vmassol@octo.com]
>
> On our J2EE project, we have fully switched from using standard java
> classes to using Avalon components. They are heavily used. This project
> is a very high performance one, which is what is bringing the following
> questions.
>
> 1/ Is ECM performant ?

Yes. Very. Don't worry about Berin's profiling and reworking and the
ContainerManager and all that.

ECM is far from being the performance bottleneck. ContainerManager & co.
is being written to make sure the CM never will be the bottleneck, even
if your code looks like this:

    while (true) {
        manager.release (manager.lookup (MyComponent.ROLE));
    }

> 2/ Do you know of anyone who has implemented a "performance mission
> critical" ECM, i.e. designed for performance rather than feature ?

I have not done that, but I have increased performance by an order of
magnitude in Cocoon2 by writing my own components.

In my experience, the ECM is *never* the bottleneck. The time I spend
looking up components is always negligible relative to the time
I spend using the components.

As a matter of fact, the speedup I mention above would not be
possible without a feature-rich ECM: It allowed me to plug in
my component easily.

> 3/ Would you recommend using the provided ECM for our need or would you
> say we need to implement our own ECM if we wish to get performance
> results ?

That depends very much on what your application will do. What components
will you use? Are the components themselves performant?

For example, if you lookup a component in the ECM, and that component
does a remote call, it doesn't matter how performant the ECM is: You
spend 99.9% in the remote call. So if any of your components do
a database lookup, or an SQL query, you will spend about 1000 times longer
in the lookup than in the ECM. (I am not making these numbers up.) So
even if the ECM operated instantaneously, you'd only get a 0.1% speedup.

A way around the ECM:

If you can keep a reference to a component throughout the life of
the client, do so instead of looking up every component as it is about
to be used and then released. (You won't have any pooling, but if a
component
is being used by the client *all the time*, pooling will not do you any
good anyway, as the components do not spend any time in the pool.)

But first - make sure that the ECM really is the bottleneck.

/LS


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message