[ https://issues.apache.org/jira/browse/SLING-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015366#comment-13015366 ]
Felix Meschberger commented on SLING-2045: ------------------------------------------ In fact, thinking about it a bit more, I wonder, whether on-demand loading is still viable: * It makes the code more complex * Querying a single message amounts to scanning more than a single message (since the initial code we made key property optional using the node name as the key instead) * Over time the complete (or almost complete) resource bundle will be loaded anyway. Thus I think we should forget about on-demand loading and instead fully load the resources when the ResourceBundle is first loaded. > JcrResourceBundle should cache the key as its value if the query returns no > resource > ------------------------------------------------------------------------------------ > > Key: SLING-2045 > URL: https://issues.apache.org/jira/browse/SLING-2045 > Project: Sling > Issue Type: Bug > Components: Extensions > Affects Versions: I18n 2.0.4 > Reporter: Felix Meschberger > Assignee: Felix Meschberger > Fix For: I18n 2.0.6 > > > The JcrResourceBundle.handleObject(String) method uses a query to find a > resource for the key, if it has not cached it yet. If such a resource is > found, it is cached and returned. If no resource is found the key is returned > but not put into the cache. > On repeated query of the same key the same query is run over and over. This > causes a majore performance hit. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira