多实例与单实例应用程序
我在一次采访中被问到这个问题。为什么即使打开了应用程序的多个实例,Firefox 也会在任务管理器中显示单个进程,而 Internet Explorer 8 和 Google Chrome 在任务管理器中显示多个进程?那么在不同的应用中,哪些因素决定了这种行为呢? 请尽快答复!
I was asked this question in an interview. Why does firefox show a single process in the task manager even when multiple instances of the application is open while Internet Explorer 8 and Google Chrome show multiple processes in the task manager? So what factors decide this kind of behaviour in different applications?
Please answer as soon as possible!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每个会话始终只打开 1 个 Firefox 实例,但它可以有多个窗口。这与 Chrome 和 IE 不同,其中为每个选项卡和窗口创建一个新实例。两者都有优点和缺点。
对于初学者来说,如果在 IE 或 Chrome 中,1 个页面崩溃(由于插件或错误或其他原因),则只有该实例崩溃,不会影响其他实例。它也更安全,破解 1 个页面并不意味着您可以访问整个浏览器,因为所有页面都是隔离的。代价是性能上有一点损失,因为每个实例都有窗口开销,并且没有简单的方法来共享资源。
编辑
请阅读:http://blog.chromium.org/2008/09 /多进程架构.html
There is always only 1 instance of firefox open per session, but it can have multiple windows. Thats different from chrome and IE where for each tab and window, a new instance is created. Both have advantages and disadvantages.
For starters, if in IE or Chrome, 1 page crashes (due to plugins or bugs or whatever), only that instance crashes and that wont affect other instances. Its also more secure, hacking 1 page doesnt mean you have access to the whole browser since all pages are isolated. The cost is a little loss in performance since you have the overhead of windows for each instance and no easy way of sharing resources.
EDIT
Please read: http://blog.chromium.org/2008/09/multi-process-architecture.html