var test =
(
from testNode in home.Children
select testNode
).ToList();
This code seems to be pretty slow. My home node has multiple document types as children and I want to fetch them all. Is there a faster way to do this?
If I try to fetch all the child nodes of a single document type it seems much faster. Is it slow because it needs to fetch children from multiple document types?
That should perform exactly the same as if you're getting the children of a particular type, IIRC it creates all of the children on the enumeration of the Children property or the OfType style property.
The only difference is that there is a filter added to the OfType version.
How many child nodes are there of the home object?
What kind of performance difference are you seeing?
Linq to Umbraco slow?
Hello,
I've got the following code:
This code seems to be pretty slow. My home node has multiple document types as children and I want to fetch them all. Is there a faster way to do this?
Jeroen
Can't edit my post so I'll reply....
If I try to fetch all the child nodes of a single document type it seems much faster. Is it slow because it needs to fetch children from multiple document types?
Jeroen
That should perform exactly the same as if you're getting the children of a particular type, IIRC it creates all of the children on the enumeration of the Children property or the OfType style property.
The only difference is that there is a filter added to the OfType version.
How many child nodes are there of the home object?
What kind of performance difference are you seeing?
is working on a reply...