Skip to content

[🐛 Bug]: Performance of Selenium 4 is significantly slower than 3.141.59 #10242

@andrewnicols

Description

@andrewnicols

What happened?

As discussed in SeleniumHQ/docker-selenium#1444, the time to init a session is significantly slower in Selenium 4.X than it is in version 3.141.59.

In my instance, with 4.1.1 it is anywhere between 4 and 10 times slower than 3.141.59 to initialise a new session.

When resetting sessions between tests, this adds up to a significant amount and radically slows down test runs. In our case w e have around 12,000 tests. When

How can we reproduce the issue?

I've created a repository to demonstrate the performance to just initialise the session: https://github.com/andrewnicols/selenium-1444

Relevant log output

➜  selenium-1444 git:(main) node index.js
Starting runs for chrome 3.141.59 against http://localhost:5444/wd/hub
==================================================
	Completed run for chrome 3.141.59 against http://localhost:5444/wd/hub
	Average run time for 50 runs: 599.647109117508
Starting runs for chrome 4.1.1 against http://localhost:4444/
==================================================
	Completed run for chrome 4.1.1 against http://localhost:4444/
	Average run time for 50 runs: 4900.971164139509
Starting runs for firefox 3.141.59 against http://localhost:5444/wd/hub
==================================================
	Completed run for firefox 3.141.59 against http://localhost:5444/wd/hub
	Average run time for 50 runs: 1001.9559491628409
Starting runs for firefox 4.1.1 against http://localhost:4444/
==================================================
	Completed run for firefox 4.1.1 against http://localhost:4444/
	Average run time for 50 runs: 4622.045899059176

Operating System

MacOS Monterey 12.1

Selenium version

4.1.1

What are the browser(s) and version(s) where you see this issue?

Chrome 97.0.4692.71, Firefox 95.0.2

What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 97.0.4692.71 (adefa7837d02a07a604c1e6eff0b3a09422ab88d-refs/branch-heads/4692@{#1247}), geckodriver 0.30.0 (d372710b98a6 2021-09-16 10:29 +0300)

Are you using Selenium Grid?

No, but I believe this is also experienced with Grid (See linked issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-gridEverything grid and server relatedI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions