Guava's got some awesome support for caches; they may be the best feature in the library (and Multisets/Multimaps are pretty awesome). If you implement this (and it sounds like a good enhancement), you should use them for it.
One thing to consider: this cache will hold references to classes, and under certain circumstances (especially OSGI-style plugins with child classloaders or webapps in an app server) that can result in classes not being unloaded when they're no longer used. I don't think any of those situations applies here, but someone who knows the architecture of ActiveMQ plugins should probably confirm that. Tim On May 2, 2015 3:05 PM, "Kevin Burton" <bur...@spinn3r.com> wrote: > OK. I’ve fixed 2-3 significant bugs in ActiveMQ with large numbers of > queues and degraded performance. Most of theses are O(N^2) bugs so the more > queues you have the more this becomes VERY painful. > > I don’t have an easy fix of this one though. > > Queue creation right now is about 3x slower than it could be…. Mostly > because of AnnotatedMBean. > > http://imgur.com/a/iS1Xb > > This is a constant time issue though. Not as urgent of a fix as the other > bugs. > > This is ALL due to reflection. > > What I was thinking of doing was building a cache so that we could lookup > the annotation info from the Class in the cache first, and if it’s absent, > read it from reflection. > > Thoughts? > > -- > > Founder/CEO Spinn3r.com > Location: *San Francisco, CA* > blog: http://burtonator.wordpress.com > … or check out my Google+ profile > <https://plus.google.com/102718274791889610666/posts> >