You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Joerg Hoh (Jira)" <ji...@apache.org> on 2022/01/12 14:36:00 UTC

[jira] [Updated] (SLING-10968) Reduce reload events on content changes

     [ https://issues.apache.org/jira/browse/SLING-10968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joerg Hoh updated SLING-10968:
------------------------------
    Description: 
Currently whenever a relevant change to the repository 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

  was:
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


> 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
>            Assignee: Joerg Hoh
>            Priority: Major
>             Fix For: Resource Resolver 1.8.2
>
>
> Currently whenever a relevant change to the repository 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)