If your HTML has 100.000 elements (which you know some times it gets crazy), the #root > div will return first 98% of the elements, and then it's going to evaluate which of them are inside #root.