Improve eficciency of NonEmptyNavigator's constructor for larger collections of web elements #223

Closed
geb-bot opened this Issue Oct 4, 2012 · 3 comments

Projects

None yet

2 participants

@geb-bot
geb-bot commented Oct 4, 2012

Originally created by Marcin Erdmann.

Due to the fact that in the constructor of NonEmptyNavigator we're calling unique() on the collection of webelements passed in it means that we're comparing each element with all the others. It turns out that the equals() implementation of RemoteWebElement sends a command to the browser to get the result of the comparison which is quite a time consuming thing to do. So if our selector passed to $/find returns 25 elements we will do 300 more calls to the remote browser to make sure that we have no duplicates, which means that creating the navigator will most probably take over a second!

@geb-bot
geb-bot commented Oct 17, 2012

Originally posted by Luke Daley.

This will be interesting.

I'll look at this as soon as I'm back.

@geb-bot
geb-bot commented Oct 23, 2012

Originally posted by Marcin Erdmann.

Fixed in geb/geb@2f7f281

@geb-bot
geb-bot commented Aug 18, 2013

Resolved

@geb-bot geb-bot added the Bug label Apr 12, 2015
@erdi erdi was assigned by geb-bot Apr 12, 2015
@geb-bot geb-bot added this to the 0.9.0 milestone Apr 12, 2015
@geb-bot geb-bot closed this Apr 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment