Skip to content

High CPU usage with chromedriver 124.0.6367.78 and selenium-java 4.20.0[🐛 Bug]:  #13872

@dmidura

Description

@dmidura

What happened?

I am seeing very high CPU usage when running automation. The Chrome processes are not quitting after the automation directs the driver to quit. Instead, they collect in the background and just add to the CPU load. This just started when chrome upgraded to 124.0.6367.79. I was running selenium-java 4.19.1, but I've tried with 4.20.0 and haven't seen an improvement.

I am on chromedriver 124.0.6367.79
I am using selenium-java 4.20.0
I am running in a Windows environment.

Can someone please tell me how to reduce the CPU load clocking for my automation?

How can we reproduce the issue?

This is my driver initialization:
        
ChromeOptions chromeOpts = new ChromeOptions();
        chromeOpts.addArguments("--window-size=1920,1080");
        chromeOpts.addArguments("--disable-gpu");
        chromeOpts.addArguments("enable-automation");
        chromeOpts.addArguments("--no-sandbox");
        chromeOpts.addArguments("--disable-infobars");
        chromeOpts.addArguments("--disable-dev-shm-usage");
        chromeOpts.addArguments("--disable-browser-side-navigation");
        chromeOpts.addArguments("--disable-gpu");
        chromeOpts.addArguments("disable-features=NetworkService");
        chromeOpts.addArguments("--disable-extensions");
        chromeOpts.addArguments("--dns-prefetch-disable");
        chromeOpts.addArguments("--remote-allow-origins=*");
        chromeOpts.setExperimentalOption("prefs", setDownloadPath());
        chromeOpts.setPageLoadStrategy(PageLoadStrategy.NORMAL);

        LoggingPreferences logPrefs = new LoggingPreferences();
        logPrefs.enable(LogType.PERFORMANCE, Level.ALL);
        chromeOpts.setCapability("goog:loggingPrefs", logPrefs);

WebDriver driver = new ChromeDriver(chromeOpts);

// do automation with the driver

driver.quit();

Relevant log output

I can only see this is happening by looking at the running processes in my windows task manager.

Operating System

Windows 11 Enterprise

Selenium version

4.19.1, 4.20.0

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

Chrome 124.0.6367.79

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

chromedriver 124.0.6367.78

Are you using Selenium Grid?

no

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions