Querybuilder vs Traversal for a certain path
Based on best practices following is a quote from the reference link
In case of scenario where we have a definite path to lookup (e.g. /content/geometrixx/home/, under home say we have 500 pages). We can follow following approaches
- Query builder with path parameter is going to look up only that path (e.g. http://localhost:4502/bin/querybuilder.json?p.hits=full&property=jcr%3atitle&property.value=Triangle&path=/content/geometrixx/home). This can provide additional features like orderBy and conditions (for these we would need to write new code otherwise)
- Manually traversing the node is going to iterate over 500 nodes and collect information.
Which one is better in this case and why it is recommended to avoid queries and use traversing instead?
Thanks,
Sandeep