On 17-Apr-08, at 9:03 PM, Chris Hostetter wrote:
: I briefly considered it when I threw the caching stuff together...
but
: the key here is that it's an LRUCache using LinkedHashMap, and there
: is no ConcurrentLinkedHashMap.
But we could have an alternate ConcurrentHashMap based SolrCache that
isn't LRU for people who plan on sizing their Caches big enough that
they
don't care aboutthe replacement strategy (random replacement could be
"good enough")
Random thought: could we do better using a combination of
a ConcurrentLinkedQueue for keys and a WeakHashRef for the key=>value
pairs? would that even work? (i'm not sure what the semantics of a
Queue
are when the item is already in the queue ... i'm probably smoking
crack)
Well, I should have thought of this when replying to Fuad to begin
with, but the single-cpu pegging behaviour of faceting is expected
when looking at a single request (all computation is occurring in one
thread).
If this is indeed due to multiple requests, and synchro is really
taking up more time that bitset intersections, then it is highly
likely that the nature of the faceting problem would benefit from a
different approach ((multivalued) FieldCache, perhaps )
-Mike