架构—Chrome 浏览器”
过程,但是当我查看任务管理器(Windows)时,只有一个
在“谷歌浏览器”下进行处理,例如现在是 Stack Overflow,
我还在打开其他选项卡,为什么我在任务管理器中找不到它?
使用这些选项卡,因为当只有一个选项卡时,它们仍然
这里。那么如何理解书中的内容呢?
最佳答案
Chromium supports four different models that affect how the browser allocates pages into renderer processes. By default, Chromium (Chrome) uses a separate OS process for each instance of a web site the user visits. However, users can specify command-line switches when starting Chromium to select one of the other architectures: one process for all instances of a web site, one process for each group of connected tabs, or everything in a single process.
就我而言,我有以下情况:
苹果系统:
视窗:
如您所见,每个任务都有自己的 PID(进程 ID)
细节:
也可以引用Chrome is using 1 process per website instead of per tab , Chrome tabs and processes问题。
这里是 official documentation关于 Chrome/Chromium 的进程模型。
每个站点的进程:
Chromium also supports a process model that isolates different sites from each other, but groups all instances of the same site into the same process. To use this model, users should specify a
--process-per-site
command-line switch when starting Chromium. This creates fewer renderer processes, trading some robustness for lower memory overhead. This model is based on the origin of the content and not the relationships between tabs.
处理每个标签:
The process-per-site-instance and process-per-site models both consider the origin of the content when creating renderer processes. Chromium also supports a simpler model which dedicates one renderer process to each group of script-connected tabs. This model can be selected using the --process-per-tab command-line switch.
关于google-chrome - chrome 真的为每个标签创建了一个进程吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39853065/