You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Michael Bauroth <mi...@falcom.de> on 2007/07/10 10:32:56 UTC

DemuxingIoHandler

Hi,

is there a special reason why DemuxingIoHandler still uses Hashtable 
instead of e.g. ConcurrentHashMap (version 2.0.0)?

Best Regards
Michael


Re: DemuxingIoHandler

Posted by Trustin Lee <tr...@gmail.com>.
On 7/10/07, Michael Bauroth <mi...@falcom.de> wrote:
> I would agree, especially under heavy load, when you use an additional
> threadpool in the filterchain.
>
> Regards
> Michael

JIRA issue has been created:

https://issues.apache.org/jira/browse/DIRMINA-398

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: DemuxingIoHandler

Posted by Michael Bauroth <mi...@falcom.de>.
I would agree, especially under heavy load, when you use an additional 
threadpool in the filterchain.

Regards
Michael


Trustin Lee schrieb:
> On 7/10/07, Trustin Lee <tr...@gmail.com> wrote:
>> On 7/10/07, Michael Bauroth <mi...@falcom.de> wrote:
>> > Hi,
>> >
>> > is there a special reason why DemuxingIoHandler still uses Hashtable
>> > instead of e.g. ConcurrentHashMap (version 2.0.0)?
>>
>> We don't need to switch all Map implementations from synchronized
>> HashMap to ConcurrentHashMap because ConcurrentHashMap doesn't perform
>> better than synchronized HashMap when small number of threads are
>> accessing it at the same time.  Moreover, it takes up more heap.
> 
> My message was somewhat in too principle. :)
> I guess DemuxingIoHandler might take advantage of ConcurrentHashMap
> because the type-handler map is accessed by multiple sessions.  WDYT?
> 
> Thanks,
> Trustin



Re: DemuxingIoHandler

Posted by Trustin Lee <tr...@gmail.com>.
On 7/10/07, Trustin Lee <tr...@gmail.com> wrote:
> On 7/10/07, Michael Bauroth <mi...@falcom.de> wrote:
> > Hi,
> >
> > is there a special reason why DemuxingIoHandler still uses Hashtable
> > instead of e.g. ConcurrentHashMap (version 2.0.0)?
>
> We don't need to switch all Map implementations from synchronized
> HashMap to ConcurrentHashMap because ConcurrentHashMap doesn't perform
> better than synchronized HashMap when small number of threads are
> accessing it at the same time.  Moreover, it takes up more heap.

My message was somewhat in too principle. :)
I guess DemuxingIoHandler might take advantage of ConcurrentHashMap
because the type-handler map is accessed by multiple sessions.  WDYT?

Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: DemuxingIoHandler

Posted by Trustin Lee <tr...@gmail.com>.
On 7/10/07, Michael Bauroth <mi...@falcom.de> wrote:
> Hi,
>
> is there a special reason why DemuxingIoHandler still uses Hashtable
> instead of e.g. ConcurrentHashMap (version 2.0.0)?

We don't need to switch all Map implementations from synchronized
HashMap to ConcurrentHashMap because ConcurrentHashMap doesn't perform
better than synchronized HashMap when small number of threads are
accessing it at the same time.  Moreover, it takes up more heap.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6