> -----Original Message-----
> From: Berin Loritsch [mailto:[EMAIL PROTECTED]]
> Sent: den 8 mars 2002 17:50
> To: Avalon Developers List
> Subject: [Fwd: Re: Performance questions about ECM]
>
>
> (My SMTP server is cracking up)
>
>
>
> -------- Original Message --------
> Subject: Re: Performance questions about ECM
> Date: Fri, 08 Mar 2002 10:10:28 -0500
> From: Berin Loritsch <[EMAIL PROTECTED]>
> To: Avalon Developers List <[EMAIL PROTECTED]>
> References:
> <[EMAIL PROTECTED]>
>
> Leo Sutic wrote:
> >
> >>From: Vincent Massol [mailto:[EMAIL PROTECTED]]
> >>
> >>Leo,
> >>
> >>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.
>
> BucketMap is never resized. Keep in mind that BucketMap only
> synchronizes when absolutely necessary. It depends on the hash of the
> object being stored. Assuming we have two objects, one with a hash of
> 233 and another with a hash of 2. They will never contend for each
> other.
>
> The only time you have thread contention is when the objects are in the
> same "bucket"--i.e. have the same hash value.
Berin,
what Vincent asked, I think, was if synchronization is needed at all, as
you will probably never put anything into the hashmap after system start.
/LS
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>