3 ms·
yeah, chrome tabs are not "shared-nothing". They have a common document cache, a common cookie store, a common history store, probably a common dns lookup resu
by iman 18y ago
yeah, chrome tabs are not "shared-nothing".
They have a common document cache, a common cookie store, a common history store, probably a common dns lookup result cache, and maybe some other things. These all need to be carefully synchronized between multiple tabs.
In fact, I would argue that multi threaded would be better than multi process so that even more things could be easily shared. For example, I imagine that css stylesheets are parsed into some big fat data structure inside browsers. If I open two tabs from a website that share a stylesheet it would be optimal if they share this same internal representation (no locking would be required for the sharing since it's read-only). This has the obvious savings of memory, but it also increases speed since the css file only has to be parsed and processed once instead of multiple times. And things like sharing keep-alive connections between tabs are virtually impossible with multi process, while very possible with multiple threads.
- anewaccountname 18y ago>probably a common dns lookup result cache Uhh, from the OS they get that for free.
- iman 18y agoBut nevertheless, browsers still maintain their own internal cache. Firefox: http://jelmer.jteam.nl/2006/11/04/disabling-the-firefox-dns-cache/ http://jelmer.jteam.nl/2006/11/04/disabling-the-firefox-dns-...
- pivo 18y agoExcept that with multi-threading you give up the OS-provided process level memory management and are back to having to track down all those memory leaks which at least Mozilla never can seem to fix satisfactorily. Even though Chrome seems plenty fast to me, I'd gladly give up some speed if I never had to close the browser and restart it because it was taking up 3/4 of available memory.