谷歌浏览器多进程(32位) [英] Many process of Google Chrome (32 bit)

查看:24
本文介绍了谷歌浏览器多进程(32位)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在 Chrome 中运行 2 个测试时,我观察到任务管理器中正在运行太多 Google Chrome(32 位)进程,这是 Chome 驱动程序的正确行为吗

解决方案

当通过 Google Chrome 执行多个 自动化测试 时,您一定观察到可能有几十个Google Chrome 进程正在运行,可以通过 Windows 任务管理器的 Processes 选项卡观察.

快照:

根据文章

<小时>

结尾

您可以在 如何退出使用 Python 通过 GeckoDriver 和 Selenium 启动的所有 Firefox 进程

When 2 tests are running in Chrome, i have observed that too many Google Chrome(32 Bit) processes are running in Task manager, Is this a correct behavior of Chome Driver

解决方案

When multiple automated tests are getting executed through Google Chrome you must have observed that there are potentially dozens of Google Chrome processes running which can be observed through Windows Task Manager's Processes tab.

Snapshot:

As per the article SOLVED: Why Google Chrome Has So Many Processes for a better user experience Google Chrome initiates a lot of background processes for each tab that have been opened by your Automated Tests. Google tries to keep the browser stable by separating each web page into as many processes as it deems fit to ensure that if one process fails on a page, that particular process(es) can be terminated or refreshed without needing to kill or refresh the entire page.


However, from 2018 onwards Google Chrome was actually redesigned to create a new process for each of the following entities:

  • Tab
  • HTML/ASP text on the page
  • Plugin those are loaded
  • App those are loaded
  • Frames within the page

In a Chromium Blog Multi-process Architecture it is mentioned:

Google Chrome takes advantage of these properties and puts web apps and plug-ins in separate processes from the browser itself. This means that a rendering engine crash in one web app won't affect the browser or other web apps. It means the OS can run web apps in parallel to increase their responsiveness, and it means the browser itself won't lock up if a particular web app or plug-in stops responding. It also means we can run the rendering engine processes in a restrictive sandbox that helps limit the damage if an exploit does occur.

As a conclusion, the many processes you are seeing is pretty much in line with the current implementation of


Outro

You can find a relevant discussion in How to quit all the Firefox processes which gets initiated through GeckoDriver and Selenium using Python

这篇关于谷歌浏览器多进程(32位)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆