> -----Original Message-----
> From: Leo Sutic [mailto:[EMAIL PROTECTED]]
> Sent: 08 March 2002 20:01
> To: Avalon Developers List
> Subject: RE: Performance questions about ECM
> 
> 
> 
> > From: Vincent Massol [mailto:[EMAIL PROTECTED]]
> >
> > Leo,
> >
> > First thanks for the quick answer.
> >
> > The problem with our application is that there is a very very strict
> > requirement : 99.97% of user requests must not take longer than 1
second
> > (it's not a web application and we do control the maximum number of
> > users that come in the system, lucky us !).
> 
> OK... I would do all my lookups in compose() then, and release them in
> dispose().
> 

yep that's what we are doing everywhere. However, for the SingleThreaded
components that are using either SingleThreaded or ThreadSafe components
the issue is still the same (their compose() method will be called for
every lookup of the SingleThreaded component, which will in turn do
lookups for all dependent components). As it is a SingleThreaded
component an instance of it cannot usually be kept (which is why it is a
SingleThreaded component in the first place) ....

> That brings the ECM totally out of the loop when it comes to
processing,
> and your code will run at max speed.

Not really, see above.

> 
> That'd be the ideal, right?
> 
> > I was wondering really about why we have to use synchronized in
> > BucketMap.get().
> 
> I think the only risk is a concurrent BucketMap.put that may resize
the
> map and thus move stuff around. Then again, I might be wrong about
this
> one.

There cannot be a concurrent put() for ThreadSafe components as they are
initialized at init time by the CM ! (making the assumption we don't
want decommissioning of ThreadSafe components).

> 
> > It seems to me the only reason is for decommissioning
> > the components. However, decommissioning is a rare event (which do
not
> > happen during the whole life of most application). Lets' say I don't
> > care about releasing ThreadSafe component; why would I need a
> > synchronized block in lookup() ?
> 
> /LS
> 

Thanks again
-Vincent



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to