Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello everyone.
I have a very generic question which is more of something I've been wondering. It's not of importance. So, I'm used to doing something like this:
blabla.Parent()
or
blabla.first()
blabla.Ancestor('blibliblulu') blabla.Children blabla.Descendant('iWasOnceACowboy')
The question is, is that way of traversing up and down the tree killing performance?
If so, is there a better way of searching for nodes?
Thanks in advance for any replies.
Hi Harry
Querying with Descendants, DescendantsOrSelf is the worst traversing methods, avoid them.
Read more about performance pitfalls - https://our.umbraco.org/documentation/reference/Common-Pitfalls/
Thanks,
Alex
Hi Harry,
Depends on your site actually. If you only have 100 content items using descendants won't hurt your perfomance that much.
But when you have 10000 content items this will become a bottle neck.
I did a talk on how to optimize umbraco for speed. And also showed several alternatives to descendants.
Slides can be found here : https://www.slideshare.net/dawoe/the-need-for-speed-uk-fest
Also this article on the subject is interesting : https://skrift.io/articles/archive/testing-the-performance-of-querying-umbraco/
But in the bottom line i avoid the use of descendants. Even a greed xpath query will give you better performance
Dave
Exactly what I needed. Thanks so much!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Is traversing umbraco slow?
Hello everyone.
I have a very generic question which is more of something I've been wondering. It's not of importance. So, I'm used to doing something like this:
or
or
The question is, is that way of traversing up and down the tree killing performance?
If so, is there a better way of searching for nodes?
Thanks in advance for any replies.
Hi Harry
Querying with Descendants, DescendantsOrSelf is the worst traversing methods, avoid them.
Read more about performance pitfalls - https://our.umbraco.org/documentation/reference/Common-Pitfalls/
Thanks,
Alex
Hi Harry,
Depends on your site actually. If you only have 100 content items using descendants won't hurt your perfomance that much.
But when you have 10000 content items this will become a bottle neck.
I did a talk on how to optimize umbraco for speed. And also showed several alternatives to descendants.
Slides can be found here : https://www.slideshare.net/dawoe/the-need-for-speed-uk-fest
Also this article on the subject is interesting : https://skrift.io/articles/archive/testing-the-performance-of-querying-umbraco/
But in the bottom line i avoid the use of descendants. Even a greed xpath query will give you better performance
Dave
Exactly what I needed. Thanks so much!
is working on a reply...