Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ElementsCollection performance using iterators #641
Once I had to iterate through an Elements collection of 100+ elements I faced that it takes too much time (~10 seconds).
So I investigated the issue and found that when we do the iteration - Selenide uses SelenideElementIterator to iterate BySelectorCollection. And it calls BySelectorCollection's method
So i tried an experiment: I've changed the code of BySelectorCollection::getActualElements to:
and tested it on:
As an output I got:
Holding experiments with elements amount I figured out the the amount found elements is (2*N^2 + N), where N - amount of elements in collection.
Should it really behave like that?
Tell us about your environment