activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Burton <>
Subject Re: More ActiveMQ hotspots.. courtesy of continuous profiling :)
Date Tue, 02 Jun 2015 14:17:53 GMT
On Tue, Jun 2, 2015 at 6:16 AM, Tim Bain <> wrote:

> Kevin,
> Great finds.  What tool were you using?
Java Mission Control.. Free for development.. but I think the community
needs a real open source tool.  Pseudo -free isn’t a good idea.

> Is it safe to assume you'll submit patches (when you have time) so we don't
> need to capture these in JIRA?

Might want to create one.  The problem with my patch set, is that I’m still
stuck on 5.10.2.  There’s a bug introduced sometime around 5.11 that only
impacts the memory store.  I haven’t been able to track it down yet so I
can’t retarget my patches to head.  That, and I think one of my patches
doesn’t work with LevelDB so I need to fix that.

Realistically, I should fix all those issues so that I can move between

> Adding a synchronized Multimap<Consumer, Subscription> to
> ManagedRegionBroker looked good to me.  It won't be threadsafe against
> simultaneous registers/unregisters for the same subscription, but it looks
> like that class already has that problem so I don't think that's a reason
> not to do it.

Or store a second concurrent hash map.  that would fix it.

> In addConsumerToList(), I think we can do a sorted insertion (iterate
> through the list till you find the right place based on the comparator,
> then insert) to skip the re-sort.  Either we'll be rolling the list or we
> won't, but either way the list will be in sorted order, except that the
> minimum element might not be the first one.  So find the minimum element's
> index (O(log N), but can be optimized to O(1) for the not-rolling case),
> then do a sorted insert starting at that index and wrapping if necessary.

True.. That would definitely make that faster.


Location: *San Francisco, CA*
… or check out my Google+ profile

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message