Hi Aem-community,
Is it better use node iterator or querybuilder to find components on page and get properties of components?
Solved! Go to Solution.
Views
Replies
Total Likes
When you need to find that on a single page, use the iterator approach; the static overhead of queries is typically higher than the cost of iterating.
@Keerthi0555 Node iteration is always faster and performance efficient that Query Builder. If you know the exact path to iterate and get the values , I would say use Node Iteration.
Please find a more detailed explanation from @Jörg_Hoh https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/child-node-iterating/m-p/3...
If you want to iterate through all the resources then go with iterator.
If you want a specific resource(s) with specific property then search using query builder.
Depends on your use case.
When you need to find that on a single page, use the iterator approach; the static overhead of queries is typically higher than the cost of iterating.
Views
Likes
Replies
Views
Likes
Replies