[ https://issues.apache.org/jira/browse/SLING-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484913#comment-14484913 ]
Felix Meschberger commented on SLING-4585: ------------------------------------------ As I pointed at in [my comment|https://issues.apache.org/jira/browse/JCR-3870?focusedCommentId=14484909&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14484909] to JCR-3870: New API is not needed and not helpfull. Rather the implementation of the API should be improved to support the API usage pattern as suggested by the API specification. As such, I think there is nothing to be done in Sling. BTW: I once tested replacing the current if-exists-then-access pattern with a try-access-catch pattern. Overall performance of the resource resovler was actually worse and so the existing pattern prevails. Also, using exceptions for flow control is bad programming styl so I prefer keeping the if-exists-then-access pattern -- of course, best would be if the JCR's getItem method would just return null if an item is not existing or not visible... > Performance: Use JackrabbitSession#getItemOrNull to speed up > JcrResourceProvider#createResource > ----------------------------------------------------------------------------------------------- > > Key: SLING-4585 > URL: https://issues.apache.org/jira/browse/SLING-4585 > Project: Sling > Issue Type: Improvement > Components: JCR, ResourceResolver > Affects Versions: JCR Resource 2.5.0 > Reporter: Joel Richard > Priority: Critical > Labels: performance > > If the current session is a JackrabbitSession, JcrResourceProvider should use > getItemOrNull (as soon as exported) to save rendering time. > See referenced issue and the following mail thread for more information: > http://mail-archives.apache.org/mod_mbox/jackrabbit-oak-dev/201504.mbox/%3CD1495A09.3B670%25anchela%40adobe.com%3E -- This message was sent by Atlassian JIRA (v6.3.4#6332)