[ https://issues.apache.org/jira/browse/SLING-2521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Edelson updated SLING-2521: ---------------------------------- Attachment: SLING-2521.patch This looks to be reasonably simple to fix - we just have to treat aliases like vanity paths, e.g. something where we store a cache of the values rather iterating through the node structure. Proposed patch attached. This is not 100% backwards compatible as the former behavior supported having multiple nodes with the same alias in the same path, e.g. /content/foo bar - sling:alias = test baz - sling:alias = test The resolved path for /content/foo/test would depend upon the node order of bar and baz. With this patch, the behavior would be non-deterministic (unless respectDocumentOrder was enabled in Jackrabbit). > Improve performance of sling:alias lookups and/or provide the ability to > disable this feature > --------------------------------------------------------------------------------------------- > > Key: SLING-2521 > URL: https://issues.apache.org/jira/browse/SLING-2521 > Project: Sling > Issue Type: New Feature > Components: JCR > Affects Versions: JCR Resource 2.1.0 > Reporter: Felix Meschberger > Attachments: disabling-alias-performance.png, SLING-2521.patch > > > The the JCR based ResourceResolver.resolve method currently support > sling:alias properties on nodes to allow for resolution of translated URLs. > This is potentially a very expensive operation particularly in the case of > non existing resource. > It should be analyzed whether (a) disabling sling:alias support has a > measurable benefit on resource resolution (particularly when not finding a > resource) and (b) whether it would be easy and simple to disable such support > per configuration. -- 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