cshannon commented on issue #4544:
URL: https://github.com/apache/accumulo/issues/4544#issuecomment-2105745795

   @ben-manes - Thanks for the input, that helps. One question I was wondering 
is that currently this uses a `LoadingCache` vs `AsyncLoadingCache` and I was 
wondering if there would be any reason to switch and any difference with how 
the refresh behavior works. The refresh operation looks like it will be done in 
the background even for a `LoadingCache` and the old value returned, so I think 
the current `LoadingCache` is ok in this case.
   
   I think the main benefit of the `AsyncLoadingCache` is when the computation 
is slow for the load so you reduce contention on the cache when other threads 
are hitting it since you put the loads onto an executor. So for the sync cache 
I assume the performance is based on how fine grained the locking is when 
running computeIfAbsent(). In this case I'm not sure how much of a benefit that 
would be, I would need to look into it more.


-- 
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]

Reply via email to