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

Joerg Hoh commented on SLING-10968:
-----------------------------------

PR: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/54

> Reduce reload events on content changes
> ---------------------------------------
>
>                 Key: SLING-10968
>                 URL: https://issues.apache.org/jira/browse/SLING-10968
>             Project: Sling
>          Issue Type: Improvement
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.8.0
>            Reporter: Joerg Hoh
>            Priority: Major
>
> Currently whenever a relevant change to the  is detected, the configuration 
> is reloaded [0] and a respective event is sent [1]. This event does not 
> contain the location of the actual change, but only the fact that such an 
> event happened [2].
> If multiple relevant changes happen this can mean that multiple events are 
> sent. It is already prevented that multiple reloads happen within the same 
> {{onChange}} call.
> The only observable change would be that that instead of potential multiple 
> events just a single event is fired (if at all). 
> [0] 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/ea9a34577edf7eff53b5a8f8bd4f1417a72af5aa/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java#L682
> [1] 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/ea9a34577edf7eff53b5a8f8bd4f1417a72af5aa/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java#L756
> [2] 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/ea9a34577edf7eff53b5a8f8bd4f1417a72af5aa/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java#L926



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to