Honestly I don't see it being an issue. There is already plenty of use of
concurrent hash map in the code base. Often there are ten or so concurrent
hash maps and then just one copy on write array list. So I just changed the
list to a map/set.
If there is any memory overhead it's linear and probab
So are we worried that there may be users who might be better off with the
lower memory usage of the original implementation in addition to users such
as Kevin for whom the faster implementation is better? Do we need the
ability to choose between the implementations, or are the memory concerns
min
It can be.. but we’re only talking about 50k items. CHM should be fine
around that order of items. The problem before was that there were
multiple copy on write lists and queues (the Java collection kind) being
scanned and purged again. One removed ActiveMQ works fine on large numbers
of queues
Nice! I like what you've done. I originally used ConcurrenthashMap - but found
it a bit of a hog, would be interested if you find different?
> On 7 May 2015, at 19:58, Kevin Burton wrote:
>
>> On Thu, May 7, 2015 at 6:30 AM, Tim Bain wrote:
>>
>> I agree with your approach with the WeakRunn
http://i.imgur.com/JyLrIZQ.png
here’s a screenshot of the total number of queues per server. It’s pretty
clear where I did the upgrade ;)
On Thu, May 7, 2015 at 11:58 AM, Kevin Burton wrote:
>
>
> On Thu, May 7, 2015 at 6:30 AM, Tim Bain wrote:
>
>> I agree with your approach with the WeakRun
On Thu, May 7, 2015 at 6:30 AM, Tim Bain wrote:
> I agree with your approach with the WeakRunnable; I think that will achieve
> the goal without the performance hit of calling purge() after each
> cancellation.
>
>
I went ahead with this solution and it seems to be working well in
production.
Si
I agree with your approach with the WeakRunnable; I think that will achieve
the goal without the performance hit of calling purge() after each
cancellation.
If you take on the synchronized keywords, you should consider whether we're
worried about concurrent calls to doStart() and doStop(). That s
Wanted some feedback on this.
https://gist.github.com/burtonator/34a67c24ca9ce0574c04
I think I want to refactor the cancel method…
it calls purge() which is VERY expensive on large numbers of queues. N^2
expensive.
once the cancel() is called, the timer task won’t get executed, HOWEVER
there’s