[
https://issues.apache.org/jira/browse/MYFACES-4586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17697436#comment-17697436
]
Thomas Andraschko commented on MYFACES-4586:
--------------------------------------------
great catch!
> [perf] Resource bundle not cached
> ---------------------------------
>
> Key: MYFACES-4586
> URL: https://issues.apache.org/jira/browse/MYFACES-4586
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.3-next-M7, 4.0.0
> Environment: primefaces-test project, jakarta branch
> Reporter: Manuel K
> Assignee: Thomas Andraschko
> Priority: Major
> Fix For: 2.3-next-M8, 4.0.1
>
>
> 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:
> {code:java}
> <h:form id="frmTest">
> #{messages['test1']}
> #{messages['test2']}
> #{messages['test3']}
> #{messages['test4']}
> </h:form> {code}
>
> When using MyFaces, the output after loading the application run by executing
> _mvn clean jetty:run -Pmyfaces40_ is:
> {noformat}
> TestResourceBundle initialized
> TestResourceBundle initialized
> TestResourceBundle initialized
> TestResourceBundle initialized{noformat}
>
> When using Mojarra ({_}mvn clean jetty:run -Pmojarra40{_}), the output is:
> {noformat}
> TestResourceBundle initialized{noformat}
>
> Thank you very much in advance!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)