You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2013/05/24 11:38:21 UTC
[jira] [Commented] (SLING-2881) [I18N][Performance]
JcrResourceBundleProvider clears the cache on mix:language changes
[ https://issues.apache.org/jira/browse/SLING-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13666162#comment-13666162 ]
Alexander Klimetschek commented on SLING-2881:
----------------------------------------------
I think listening for sling:Message should be enough. But.. mix:language modifications are probably necessary to catch changing the language of a dictionary (which I can imagine happens when you create/copy a dictionary, and then change the language to the "new" one).
Maybe we have to event listeners:
* sling:Message modification => full reload
* mix:language modification => quick check if path is already covered in a cached dictionary and only reload (everything) in this case; if it's a new dictionary and has no strings yet (= no sling:message), we don't have to care, and as soon as a string is added, you get the sling:Message event above
> [I18N][Performance] JcrResourceBundleProvider clears the cache on mix:language changes
> --------------------------------------------------------------------------------------
>
> Key: SLING-2881
> URL: https://issues.apache.org/jira/browse/SLING-2881
> Project: Sling
> Issue Type: Bug
> Components: Extensions
> Affects Versions: i18n 2.2.4
> Environment: CQ5.6
> Reporter: Rob Ryan
> Labels: performance
>
> Performance of an appplication using Sling i18n JcrResourceBundleProvider suffers drastically if nodes with mixin type mix:language are modified frequently.
> The reason for the performance degradation is that JcrResourceBundleProvider registers a JCR event listener for node types: mix:language and sling:Message. It then clears the i18n resource bundle cache whenever a node with these types appears in an event.
> The JCR 2.0 spec indicates applications should use a mix:language type as the standard way to provide a property specifying the natural language which the content of a node is expressed.
> Therefore clearing the resource bundle cache on a change to *any* node with a mix:language type is inappropriately broad.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira