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?
Recursive or not?
Hi,
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?
or
Where the homepage attribute simply returns:
I would have though the homepage attribute would be better for performance than recursively finding the property?
Thanks
Hi Gareth,
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).I know it doesn't look as succinct, but at least the order is guaranteed.
Cheers,
- Lee
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?
Cheers,
- Lee
is working on a reply...