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

Avoid calling Locale.getAvailableLocales() because it is very slow

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • I18n 2.0.2
    • Extensions
    • None

    Description

      Currently, JcrResourceBundleProvider.toLocale calls Locale.getAvailableLocales().
      The first call to this method is very slow (3.4 seconds on my machine) because
      it scans many jar files.

      http://svn.apache.org/viewvc/incubator/sling/trunk/bundles/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/JcrResourceBundleProvider.java?view=markup

      It looks like calling this method is not required.

      Attachments

        1. JcrResourceBundleProvider.patch
          0.9 kB
          Thomas Mueller

        Activity

          People

            fmeschbe Felix Meschberger
            thomasm Thomas Mueller
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: