Opinionated Programmer - Jo Liss's musings on enlightened software development.

Selenium 2.0 (WebDriver): Firefox vs. Chrome performance

This article is about a software testing tool called Selenium. If you came here looking for a general performance comparison between Firefox and Chrome, you are in the wrong place!

I have a test suite that uses the awesome Selenium 2.0 (WebDriver) (through Capybara), and the other day I was wondering, how do Firefox and Chrome stack up in terms of performance?

Early on I had configured Selenium to use the Chrome driver, because Chrome has lower start-up times than Firefox.

That, it turned out now, had been a bad move: Since back then, my test suite had grown beyond negligible size, and now I discovered that while Chrome starts up a little faster, the Chrome driver is much much slower (it seems to have weird delays which underutilize the CPU). Compare the run times of my test suite in each browser (on Debian):

Chrome: 73 seconds
Firefox: 30 seconds

This is not a serious(tm) benchmark, but for now, the numbers are unambiguous. Firefox it is.

(Update Feb 13, 2011: This won’t be fixed, but the Chrome driver is being rewritten – I’m keeping my fingers crossed that we’ll see a faster driver in a few months. With a good driver, Chrome might have a real shot at being the faster one of the two browsers.)

(Update Mar 22, 2011: It’s still the same in Selenium 2.0b3.)