chrome 真的为每个选项卡创建一个进程吗?

Does chrome really create a process for each tab?

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.

就我而言,我有以下情况:

苹果操作系统:

Windows:

如你所见,每个任务都有自己的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.

是的,它显示当前打开的选项卡 MainTitle。 简单的控制台程序要知道

Process[] localByName = Process.GetProcessesByName("Chrome");

                foreach (Process p in localByName)
                {



                  Console.WriteLine(string.Format("Process: {0}\n Title:{1} \n P\n", p.ProcessName, p.MainWindowTitle));
    }