4 ms·
Chrome's multiprocess architecture is brilliant on paper, but I've had more problems with it in practice than I care to list. Put simply: it's not a good idea t
by GeneralMaximus 16y ago
Chrome's multiprocess architecture is brilliant on paper, but I've had more problems with it in practice than I care to list. Put simply: it's not a good idea to launch a separate process for each tab. If it was, nobody would use threads for anything and everyone would be happy.
This is what used to happen to Chrome on my MacBook when I had "only" 2GB of RAM:
1. Navigate to HN and click on 10 interesting stories + related comment threads.
2. Chrome tries to launch 20 processes at once. Processor usage goes through the roof and knocks several weather satellites out of their orbits.
3. The entire OS X UI freezes. I can't even Cmd+Tab to another application.
4. Some Chrome processes inexplicably crash (why?!). Nearly every other app gets swapped to disk.
5. Some old tabs get swapped to disk (which means switching to them later takes 3 to 5 seconds).
6. Processor usage becomes normal after 2 minutes. The OS becomes responsive again.
7. All my frustrated Cmd+Tabs and mouse clicks are finally registered and the UI does a halting, jitery dance as my inputs are de-queued and routed to several different apps.
8. After figuring out what buttons I accidentally clicked and in which apps, I can read HN!
Note: I know I've done a fair bit of Chrome-bashing on HN lately. If that bugs you, I apologize. It's just that I can't stand terribly engineered software grabbing a large share of the market. Chrome makes some interesting trade-offs re efficiency and the result is really not that bad. Chrome works fine for most non-geek, non-tab-happy people. For people who pretty much live in their browsers, though, Chrome is a terrible choice. Unless, of course, you have powerful machines. I believe Chrome's multiprocess model will be less of a bottleneck as processors evolve, but it's a pain in the ass on most contemporary machines.
- Locke1689 16y agoThis kind of analysis is useless without numbers and testing.
- cpeterso 16y agoIf the user is quickly opening tabs, then the browser should probably use some QoS heuristic to queue or delay loading of tabs. The Firefox "BarTab" extension does something like this: https://addons.mozilla.org/en-us/firefox/addon/bartab/ https://addons.mozilla.org/en-us/firefox/addon/bartab/