Joerg Hoh created SLING-10968:
---------------------------------
Summary: Reduce aliasreload 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
Currently whenever a relevant change to the vanity paths is detected, 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 of such events happen within the list of changes processed by a
single invocation of the {{onChange()}} method, multiple events are sent.
This can be optimized in a way, that if it has been determined, that a change
event must ben sent, the remaining (not yet-processed) events can be ignored,
because an event will be sent anyway.
Now instead of potential multiple events just a single event is fired (if at
all).
[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)