Manuel K created MYFACES-4586:
---------------------------------
Summary: 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: 4.0.0
Environment: primefaces-test project, jakarta branch
Reporter: Manuel K
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)