gerlowskija commented on PR #1314:
URL: https://github.com/apache/solr/pull/1314#issuecomment-1404255891

   > I don't think the ApplicationHandler needs to be RefCount'ed because there 
is no intrinsic closing work to do (unlike SolrIndexSearcher & SolrCore, say). 
RefCount'ing is no fun -- it's awkward; not an API I reach for unless there's 
no better option. We just don't want to retain them in memory; that's all. 
There are already utilities for this -- CaffeineCache with weak references.
   
   I'm not super familiar with CaffeineCache, but I'll look into it.  Thanks 
for the suggestion @dsmiley 
   
   Two initial questions I'd have:
   
   1. Does it bring along any sort of overhead?  I see it's tracking a bunch of 
metrics and historical data for cache entries, computing RAM usage estimates, 
etc.  Does that stuff have any non-negligible cost?  Seemed reasonable to ask 
as performance is the driving motivation for this PR...
   2. I understand the drive of switching from RefCounted to `WeakReference`.  
But doesn't that get us what we need right there?  What does switching the 
enclosing data structure from ConcurrentHashMap to CaffeineCache get us - we 
don't need (or want?) cache-eviction or any of the other stuff that CC would 
bring, unless I'm missing some reason we'd need to evict?  Feel like I'm 
missing some aspect of what you're suggesting...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to