Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4586

[perf] Resource bundle not cached

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3-next-M7, 4.0.0
    • 2.3-next-M8, 4.0.1
    • General
    • None
    • primefaces-test project, jakarta branch

    Description

      When using a resource bundle the bundle for each locale is usually cached. When migrating our custom resource bundle implementation from Mojarra to MyFaces we noticed a huge performance penalty because the resource bundle was re-initialized for every message key used in the xhtml.

      I was able to create a reproducer here: https://github.com/mkomko/primefaces-test/tree/no-resource-bundle-caching

      The XHTML contains four calls to the resource bundle:

      <h:form id="frmTest">
          #{messages['test1']}
          #{messages['test2']}
          #{messages['test3']}
          #{messages['test4']}
      </h:form> 

       

      When using MyFaces, the output after loading the application run by executing mvn clean jetty:run -Pmyfaces40 is:

      TestResourceBundle initialized
      TestResourceBundle initialized
      TestResourceBundle initialized
      TestResourceBundle initialized

       

      When using Mojarra (mvn clean jetty:run -Pmojarra40), the output is:

      TestResourceBundle initialized

       

      Thank you very much in advance!

      Attachments

        Activity

          People

            tandraschko Thomas Andraschko
            mkomko Manuel K
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: