[ 
https://issues.apache.org/jira/browse/SLING-11780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17691162#comment-17691162
 ] 

Carsten Ziegeler commented on SLING-11780:
------------------------------------------

In addition to what [~royteeuwen]  mentions, I'm wondering if this optimization 
really makes a difference. So before we add any complexity, we should have data 
showing the difference.

> Cache non-existing resources
> ----------------------------
>
>                 Key: SLING-11780
>                 URL: https://issues.apache.org/jira/browse/SLING-11780
>             Project: Sling
>          Issue Type: Improvement
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.10.0
>            Reporter: Joerg Hoh
>            Assignee: Joerg Hoh
>            Priority: Major
>
> I found that in many situations various Sling features probe for the 
> existence of resources, for example the Sling Servlet Resolution and also 
> Sling Context-Aware Configuration. If these functions are called multiple 
> times during the lifetime of a ResourceResolver, the ResourceResolver always 
> checks for the presence of these resources and will consistently return 
> "null" (non-existing resource).
> Due to the MVCC pattern we can cache the information that a resource does not 
> exist at the ResourceResolver.
> To support changes performed to the Repository by this specific 
> ResourceResolver, this cache should be purged by a modifying operations 
> (move, copy, create, delete), but also on refresh.
> (Background: I found that for the rendering on a mildly complex AEM page 
> (WKND sample content) I have 18 paths, for which the existence of a resource 
> is tested more than 50 times and consistently returned "null". I expect that 
> a caching of this information will save a good number of CPU cycles in Oak.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to