Re: “Usage" and other performance improvements by avoiding CopyOnWriteArrayList.

2015-05-08 Thread Kevin Burton
> > > http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/Sets.html#newConcurrentHashSet(java.lang.Iterable) > . > It's syntactic sugar, but it makes for cleaner code so I'll probably use it > next time I need one of these. Ah. nice. Next time I look at the code I’ll

Re: “Usage" and other performance improvements by avoiding CopyOnWriteArrayList.

2015-05-08 Thread Tim Bain
On May 8, 2015 11:33 AM, "Kevin Burton" wrote: > > On Thu, May 7, 2015 at 6:05 AM, Tim Bain wrote: > > > The other reason a List sometimes gets used is when you want to be able to > > arbitrarily order the elements. If you're using the natural ordering or > > can write a comparator, you can use

Re: “Usage" and other performance improvements by avoiding CopyOnWriteArrayList.

2015-05-08 Thread Kevin Burton
Sounds good. I have one more small change to logging and I’ll submit a PR. On Thu, May 7, 2015 at 5:38 AM, Gary Tully wrote: > those changes look ok to me, as in they won't break anything and you > have numbers that can make your case. Please splash in a patch or PR. > > On 2 May 2015 at 23:08,

Re: “Usage" and other performance improvements by avoiding CopyOnWriteArrayList.

2015-05-08 Thread Kevin Burton
On Thu, May 7, 2015 at 6:05 AM, Tim Bain wrote: > The other reason a List sometimes gets used is when you want to be able to > arbitrarily order the elements. If you're using the natural ordering or > can write a comparator, you can use a SortedSet, but if you need them to be > reorderable, I do

Re: “Usage" and other performance improvements by avoiding CopyOnWriteArrayList.

2015-05-07 Thread Tim Bain
The other reason a List sometimes gets used is when you want to be able to arbitrarily order the elements. If you're using the natural ordering or can write a comparator, you can use a SortedSet, but if you need them to be reorderable, I don't know of a Collection that allows arbitrary ordering bu

Re: “Usage" and other performance improvements by avoiding CopyOnWriteArrayList.

2015-05-07 Thread Gary Tully
those changes look ok to me, as in they won't break anything and you have numbers that can make your case. Please splash in a patch or PR. On 2 May 2015 at 23:08, Kevin Burton wrote: > I’ve found 3 places where CopyOnWriteArrayList was being used and causing > significant performance impact O(N^2

Re: “Usage" and other performance improvements by avoiding CopyOnWriteArrayList.

2015-05-02 Thread Kevin Burton
And it looks like these changes, along with setting expireMessagesPeriod=0 on advisory topics, dramatically improves performance. On small numbers of queues (5k) it’s 100x. In large numbers it will be even higher. On Sat, May 2, 2015 at 3:08 PM, Kevin Burton wrote: > I’ve found 3 places where

“Usage" and other performance improvements by avoiding CopyOnWriteArrayList.

2015-05-02 Thread Kevin Burton
I’ve found 3 places where CopyOnWriteArrayList was being used and causing significant performance impact O(N^2) when using large numbers of queues. Could I get feedback on these 3 changes? https://github.com/spinn3r/activemq/commit/06ebfbf2a4d9201b57069644bdb7eb8274da0714 https://github.com/spin