Re: Possible optimization?

2007-06-21 Thread Roman Magarshak
I think that a generic interface should be used (As previously stated Map for example). >From one side you have a default with each version. On the other side , if during some time we'll find out that the choice is not optimal it's an easy switch. Adding a factory/configuration adds an unneeded com

Re: Possible optimization?

2007-06-20 Thread James Im
Trustin Lee wrote: On 6/21/07, peter royal <[EMAIL PROTECTED]> wrote: On Jun 20, 2007, at 3:42 PM, Trustin Lee wrote: > What about putting the option in IoService? > > IoAcceptor acceptor = ..; > acceptor.setSessionAttributeMapFactory(new MyMapFactory()); > > I thought about putting it to IoSess

Re: Possible optimization?

2007-06-20 Thread Mark Webb
since AbstractMap implements Map, I would go with the Map interface. There is more room for possibilities (flexibility) there I think. I am partial to the "programming to interfaces" approach. On 6/20/07, Trustin Lee <[EMAIL PROTECTED]> wrote: On 6/21/07, peter royal <[EMAIL PROTECTED]> wrot

Re: Possible optimization?

2007-06-20 Thread Trustin Lee
On 6/21/07, peter royal <[EMAIL PROTECTED]> wrote: On Jun 20, 2007, at 3:42 PM, Trustin Lee wrote: > What about putting the option in IoService? > > IoAcceptor acceptor = ..; > acceptor.setSessionAttributeMapFactory(new MyMapFactory()); > > I thought about putting it to IoSessionConfig but the ma

Re: Possible optimization?

2007-06-20 Thread peter royal
On Jun 20, 2007, at 3:42 PM, Trustin Lee wrote: What about putting the option in IoService? IoAcceptor acceptor = ..; acceptor.setSessionAttributeMapFactory(new MyMapFactory()); I thought about putting it to IoSessionConfig but the map can't be changed once its created. good place for it. als

Re: Possible optimization?

2007-06-20 Thread Trustin Lee
On 6/21/07, Mark Webb <[EMAIL PROTECTED]> wrote: That certainly would work. Since you want a framework to be as flexible as possible. On 6/20/07, peter royal <[EMAIL PROTECTED]> wrote: > > On Jun 20, 2007, at 5:45 AM, Rob Butler wrote: > > Can you make it a configurable option with the default

Re: Possible optimization?

2007-06-20 Thread Mark Webb
That certainly would work. Since you want a framework to be as flexible as possible. On 6/20/07, peter royal <[EMAIL PROTECTED]> wrote: On Jun 20, 2007, at 5:45 AM, Rob Butler wrote: > Can you make it a configurable option with the default being a > synchronized hashmap? yeah, i was thinking

Re: Possible optimization?

2007-06-20 Thread peter royal
On Jun 20, 2007, at 5:45 AM, Rob Butler wrote: Can you make it a configurable option with the default being a synchronized hashmap? yeah, i was thinking about this as well.. Maybe we just need a MapFactory that's used to create the structure hidden in the IoSession.. then people can plug i

Re: Possible optimization?

2007-06-20 Thread Mark Webb
I could see how that could be a problem ;) On 6/20/07, James Im <[EMAIL PROTECTED]> wrote: Mark Webb wrote: >Trustin, > >Not sure I understand the visibility issue. What do you mean? Are you >talking about visibility of method/fields or licensing? the visibility of the hashmap. It seems that

Re: Possible optimization?

2007-06-20 Thread James Im
Mark Webb wrote: Trustin, Not sure I understand the visibility issue. What do you mean? Are you talking about visibility of method/fields or licensing? the visibility of the hashmap. It seems that the hashmap has some visibility problem if you read the comments in the blog: http://blogs.azu

Re: Possible optimization?

2007-06-20 Thread Mark Webb
Trustin, Not sure I understand the visibility issue. What do you mean? Are you talking about visibility of method/fields or licensing? As for Cliff's JavaOne presentation, take out the asterisks from the URL: developers.sun.com/learning/javaoneonline/2007/pdf/TS-2862.pdf On 6/20/07, Trustin

Re: Possible optimization?

2007-06-20 Thread 向秦贤
ee [mailto:[EMAIL PROTECTED] > Sent: 20 June 2007 09:48 AM > To: dev@mina.apache.org > Subject: Re: Possible optimization? > > On 6/20/07, 向秦贤 <[EMAIL PROTECTED]> wrote: > > Hi, > > Not HashMap, there is a cadicates. > > http://blogs.azulsystems.com/cliff/2007/03/

Re: Possible optimization?

2007-06-20 Thread Rob Butler
Can you make it a configurable option with the default being a synchronized hashmap? - Original Message From: Trustin Lee <[EMAIL PROTECTED]> To: dev@mina.apache.org Sent: Tuesday, June 19, 2007 10:07:46 PM Subject: Re: Possible optimization? On 6/20/07, Mark Webb <[EMAIL

Re: Possible optimization?

2007-06-20 Thread Emmanuel Lecharny
> Dawie Malan > I think it's more a matter of memory footprint than a speed issue. Julien > > -Original Message- > From: Trustin Lee [mailto:[EMAIL PROTECTED] > Sent: 20 June 2007 09:48 AM > To: dev@mina.apache.org > Subject: Re: Possible optimization? > >

Re: Possible optimization?

2007-06-20 Thread Julien Vermillard
awie Malan > I think it's more a matter of memory footprint than a speed issue. Julien > > -Original Message- > From: Trustin Lee [mailto:[EMAIL PROTECTED] > Sent: 20 June 2007 09:48 AM > To: dev@mina.apache.org > Subject: Re: Possible optimization? > > On 6/

Re: Possible optimization?

2007-06-20 Thread James Im
This structure seems to be really fast. It doesn't compare memory usage. http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-2862&yr=2007&track=5 http://developers.sun.com/learning/javaoneonline/2007/pdf/TS-2862.pdf Trustin Lee wrote: On 6/20/07, ÏòÇØÏÍ <[EMAIL PROTECT

RE: Possible optimization?

2007-06-20 Thread Dawie Malan
t: Re: Possible optimization? On 6/20/07, 向秦贤 <[EMAIL PROTECTED]> wrote: > Hi, > Not HashMap, there is a cadicates. > http://blogs.azulsystems.com/cliff/2007/03/a_nonblocking_h.html Sounds interesting, but we need to address a possible visibility issue. > Its javaone speach: > d

Re: Possible optimization?

2007-06-20 Thread Trustin Lee
On 6/20/07, 向秦贤 <[EMAIL PROTECTED]> wrote: Hi, Not HashMap, there is a cadicates. http://blogs.azulsystems.com/cliff/2007/03/a_nonblocking_h.html Sounds interesting, but we need to address a possible visibility issue. Its javaone speach: developers.sun.com/learning/*javaone*online/2007/pdf/TS

Re: Possible optimization?

2007-06-20 Thread 向秦贤
Hi, Not HashMap, there is a cadicates. http://blogs.azulsystems.com/cliff/2007/03/a_nonblocking_h.html Its javaone speach: developers.sun.com/learning/*javaone*online/2007/pdf/TS-2862.pdf cliff also provide a library: https://sourceforge.net/projects/high-scale-lib 2007/6/20, peter royal <[EMA

RE: Possible optimization?

2007-06-19 Thread Gaston Dombiak
Regards, -- Gato -Original Message- From: James Im [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 19, 2007 11:44 PM To: dev@mina.apache.org Subject: Re: Possible optimization? I think it might be a good change BUT you didn't say how big was the benefit of this change on memory consumpti

Re: Possible optimization?

2007-06-19 Thread James Im
I think it might be a good change BUT you didn't say how big was the benefit of this change on memory consumption. Could you tell us how much memory the JVM was using before and after the change under the same load? Gaston Dombiak wrote: Hey, We are opening 60K concurrent connections to Openf

Re: Possible optimization?

2007-06-19 Thread peter royal
On Jun 19, 2007, at 7:07 PM, Trustin Lee wrote: WDYT? Shall we revert back to HashMap? Collections.synchronizedMap( new HashMap() ) sounds good :) -pete -- (peter.royal|osi)@pobox.com - http://fotap.org/~osi smime.p7s Description: S/MIME cryptographic signature

Re: Possible optimization?

2007-06-19 Thread Trustin Lee
On 6/20/07, Mark Webb <[EMAIL PROTECTED]> wrote: I think this is great information. I would like to see some test cases that support your information. In addition to the test cases, what environment/IDE are you performing this research on? Thanks and great work! I think Gaston's comment is c

Re: Possible optimization?

2007-06-19 Thread Mark Webb
I think this is great information. I would like to see some test cases that support your information. In addition to the test cases, what environment/IDE are you performing this research on? Thanks and great work! On 6/19/07, Gaston Dombiak <[EMAIL PROTECTED]> wrote: Hey, We are opening 6

Possible optimization?

2007-06-19 Thread Gaston Dombiak
Hey, We are opening 60K concurrent connections to Openfire and generating some heap dumps to analyze memory consumption. And we found something that really surprised us since we never heard about it. A very big part of the total memory is being consumed by ConcurrentHashMaps. The ConcurrentHash