Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10884

i18n ResourceBundleProvider is called for every change in the repo

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • i18n 2.5.16
    • i18n 2.5.18
    • i18n
    • None

    Description

      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

      Attachments

        Activity

          People

            joerghoh Joerg Hoh
            joerghoh Joerg Hoh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h