After more profiling I was seeing locate_input_element using over 60% of all time during one of my web scraper tests.  Total time for the test was about 4 minutes, with one minute of that waiting for page loads.
After more profiling I was seeing locate_input_element using over 60% of all time during
one of my web scraper tests.  Total time for the test was about 4 minutes, with one minute
of that waiting for page loads.

Most of my field lookups are by :id or :name so I checked for those "how's" and instead
of iterating through all page elements I used the OLE getElementById and getElementsByName
to find the element or collection.

The performance difference is amazing.  Before the 4 line change locate_input_element took
54.26% of the run time for my scrape.  After this change it took 0.63%.  Run time went from
3 minutes (ignoring page load times) down to about 1 minute (also ignoring page load times).

I'll keep looking for other ways to speed up Watir by using IE DHTML methods to minimize
iterating through page elements one at a time.

jarib/watir,watir/watir-classic,watir/watir-classic,jarib/watir,watir/watir-classic,watir/watir-classic,jarib/watir