[
https://issues.apache.org/jira/browse/SLING-10884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oliver Lietz closed SLING-10884.
--------------------------------
> i18n ResourceBundleProvider is called for every change in the repo
> ------------------------------------------------------------------
>
> Key: SLING-10884
> URL: https://issues.apache.org/jira/browse/SLING-10884
> Project: Sling
> Issue Type: Improvement
> Components: i18n
> Affects Versions: i18n 2.5.16
> Reporter: Joerg Hoh
> Assignee: Joerg Hoh
> Priority: Major
> Fix For: i18n 2.5.18
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> The i18n ResourceBundleProvider is registered as ResourceChangeListener and
> configured to listen to all changes within the repository.
> And if the change does not affect a languageRoot (that's probably the vast
> majority of changes), it will always open (and close) a ResourceResolver.
> This comes with some overhead (500-1000 µs, depending on setup).
> It should be possible to exclude some paths from being considered at all by
> configuration (maybe already at the level of the registration of the
> properties of the ResourceChangeListener, otherwise as part of the
> {{onChange}} method), so that the creation of this ResourceResolver can be
> avoided. In this case no ResourceBundles will be detected below these
> configured paths.
> By default /var/eventing should be excluded, so that the Sling eventing
> operations do not trigger this ResourceChangeListener.
> [1]
> https://github.com/apache/sling-org-apache-sling-i18n/blob/ca5472b409c2b0485af6f8a97db521ad6694e927/src/main/java/org/apache/sling/i18n/impl/JcrResourceBundleProvider.java#L265
--
This message was sent by Atlassian Jira
(v8.20.1#820001)