Github user afs commented on a diff in the pull request:

    https://github.com/apache/jena/pull/57#discussion_r29957731
  
    --- Diff: 
jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrCache.java ---
    @@ -58,10 +58,7 @@ private BlockMgrCache(int readSlots, int writeSlots, 
final BlockMgr blockMgr)
         {
    --- End diff --
    
    `Cache::getIfPresent` returning Optional means that the calling code ends 
up checking Optional rather than null.  Looking in TDB, for example, it's no 
gain, in fact it's a loss because of the additional object creation.  
    
    The reason is that these aren't in streams where Optional skipping is 
natural.
    
    The node cache is performance sensitive and uses getIfPresent so changes 
here might have undesirable effects.
    
    What would be good is looking at the unrelated cache code in jena-core and 
seeing if it can now be consolidated (including using LRU caching which IIRC it 
does not).



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to