avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: FW: ContainerManager and Sub-containers
Date Tue, 04 Jun 2002 23:46:38 GMT
On Wed, 5 Jun 2002 07:28, Berin Loritsch wrote:
> > I recall - one of the time I wished I had kept arguing ;)
> >
> :)  Maybe it is something we can address for the next version of Avalon
> framework....  In that case, I would like to drag Stefano into the midst
> of the discussion--he's pretty smart.

that would be kool.

> I personally want to remove the necessity of string resolution, but I
> haven't been able to come up with something that is happy for all of us
> involved.  Strings are the major bottleneck of Avalon right now.  Esp.
> for something like Cocoon where we we can expect over 1000 requests per
> second in a heavy traffic site (that translates to 86,400,000 hits in a
> day) and components are resolved at runtime.  That's a lot of string
> opperations!
> That's a lot of Generator.ROLE + "/fooo"!

Put the key in a static at top of class (or cache it in some other way) and 
that would be a lil better. Though caching all strings would be a much better 
improvement IMHO.

> This will perform better than strings will in high performance or
> throughput situations, and it is easy to use.  Let's say the container
> stores the Components in an array (or an ArrayList) instead of a
> hashmap.  With this Request object, it is possible. A map would be used
> to find the Request object, done during initialization.  The list would
> be used to serve the components.

I think that no matter how far you go down this path it is never going to be 
fast enough. IMHO the only way to do this is to lookup resources during 
initialization phase rather than at runtime and with a good assembly system 
you get all the bang of runtime lookup with little cost.

Can you give me one solid reason why it needs to be done at runtime in 99% of 
cases? I will grant you that runtime assembly may be necessary when 
components looked up are determined by request data but in other cases?


Peter Donald
* "Faced with the choice between changing one's mind, *
* and proving that there is no need to do so - almost *
* everyone gets busy on the proof."                   *
*              - John Kenneth Galbraith               *

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

View raw message