The GetChildren
call will return all Children of the item and then the Linq statement will filter the item collection based on your predicate. It is not done at a database query level, but it is done on the web server (I assume this is what you mean when you say client side, and not browser side).
To break it down, Sitecore.Data.Items.Item.GetChildren()
calls Sitecore.Data.Managers.ItemProvider.GetChildren()
which is the default item provider set via config/DI. This makes a query to the database. This returns Sitecore.Collections.ChildList
which as you point out inherits from IReadOnlyList<Item>, IReadOnlyCollection<Item>, IEnumerable<Item>, IEnumerable, ICollection
.
The Linq statement then filters the items, using the Where
extension method. This is for all practical reasons similar to using a foreach loop, adding only the items which match your predicate and then returning that list.
Depending on what you are doing, how many items you have, if you have followed best practice of not having more than 100 child items per node then it shouldn't cause any significant performance issues.