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
I have some properties on my homepage that cover the entire website. E.g. Logo.
I would like some advice on whether to use the following for performance?
Where the homepage attribute simply returns:
I would have though the homepage attribute would be better for performance than recursively finding the property?
Personally I go with...
Although I do separate them on their own lines - and add the Order attribute. (Only because I've read that attributes aren't guaranteed to preserve their order).
[Homepage(Order = 1)]
[UmbracoProperty(Order = 2)]
I know it doesn't look as succinct, but at least the order is guaranteed.
Excellent, thank you.
In answer to your question about the recursive performance... I guess this depends how deep your content-tree goes. If we're talking about a few levels deep, then there's not much performance hit. If you're going several, then yeah you'll start to see it.
With the going direct approach is probably better, as you know exactly where you want to get the property value from. You could even start to add caching on to the Ditto processors?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted