I have come across the use of inheritedValueMap recently and is fitting well for one of our scenario. Wanted to check impact of its usage.
Scenario is site config properties are stored under /content/general/mysite1 and /content/general/group/mygroupsite1. Since there are 2 different levels I need to know what is the ROOT LEVEL (which is 2 in first case and 3 in second case). Since this is used in navigation component, for each page hit I will need to check if the site config properties are stored at level 2 or 3.
Rather than branching out whether level 2 has the site config property or not, and if not then look for level 3 for the properties, I am thinking to use InheritedValueMap which gives the property value searching from child page to the parent page until it finds it. However I am not finding much documentation around its performance (I believe it is kind of recursive call to parent until there is a match). Will it be a heavy operation for each page hit or it is light weight call ?
Any insight ?
Solved! Go to Solution.
Views
Replies
Total Likes
In HTL the object is already there (inheritedPageProperties), so it has less impact on performance.
Views
Replies
Total Likes
In HTL the object is already there (inheritedPageProperties), so it has less impact on performance.
Views
Replies
Total Likes
Thanks Feike for quick reply. Actually I came to thought of using the inheritedvaluemap from your blog post only
The reason to double check was as I mentioned in the question, I am going to use it for navigation component which will be used in all the pages of the multi tenant instance (6 websites in all). So on page /content/general/website1/page1/child1/child11/child111, it will have to find the property stored at website1 and has to traverse (internally via API) from child111 to website1 bottom up. Will this be expensive ?
Views
Replies
Total Likes
Here is a good article on performance: http://aempodcast.com/2017/apache-sling/sling-resource-api-vs-jcr-api/#.WUobXxOGN-W
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies