[ 
https://issues.apache.org/jira/browse/OFBIZ-1739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacopo Cappellato closed OFBIZ-1739.
------------------------------------

    Resolution: Fixed

> If a resource bundle (for localized labels) is found, but it doesn't contain 
> any labels in the desired language, it is not cached
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1739
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1739
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Jacopo Cappellato
>            Priority: Minor
>
> For example:
> let's suppose we have a recource bundle with name SomeResourceBundle.xml that 
> only contains labels in "it" and "cn".
> Every time a label for the "en" language is looked up, the method 
> UtilProperties.getBundle("SomeResourceBundle", enLocale) is invoked.
> However the bundleCache map (line 818) doesn' contain the bundle for the en 
> local, and a call to the getProperties(...) method is done.
> That method call is very expensive because it parses the whole xml file 
> searching for a property in the desired locale; if non is found, then the 
> bundle is not put in the cache for the locale.
> This ends up with a huge number of calls to the getProperties method (and 
> parsing again and again).
> Ideally, we should put the base bundle in the cache for the en locale, even 
> if it doesn't contain any labels in that locale.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to