- Is 100 MB the marginal memory cost to add one more tab when you already have a bunch open, or is it the memory usage when you have a single tab open? Don't forget that there is a baseline amount of memory usage for the application itself.
- Measuring memory usage is hard, doubly so for web browsers. You'd think it would just be about counting all the allocations, but shared libraries, sandboxes, and cache make it complicated. Just looking at the "memory usage" panels in Windows/macOS is often misleading: unfortunately I can't find the link at the moment, but there's a great article about how for Chrome, the number you get in those panels is wrong.
- In response to the increasing demands of web standards, browsers have basically become mini-operating systems, and you'd expect them to have memory usage to match.
- Websites are complicated: DOMs get bigger all the time, and it takes memory to store them, especially with the aggressive optimizations browsers use (see next point)
- Browsers use a lot of techniques to maximize performance as much as possible: aggressive caching and JS engines that favor space-time tradeoffs for faster execution being the two big ones. But remember that these are all a question of degree: if there is less memory available, they will use less and just go slower. The browser is just using the RAM available.
tl;dr: you may not be measuring it correctly, it's a difficult problem space, browsers deliberately use as much memory as is available to optimize for speed
>- In response to the increasing demands of web standards, browsers have basically become mini-operating systems, and you'd expect them to have memory usage to match.
Allow me to partially disagree, it is true that browsers have basically become mini-operating systems, but not (IMHO) because of "increasing demands of web standards", because of "increasing demand of web publishers and all the crap that every other site has now embedded or is serving to you or is using to track this or that aspect of your visit".
A good question for the OP could be, how much memory does your Chrome use per tab if you disable javascript and open - say - 20 Hacker News pages?
use the tool ps_mem.py which tells you both the 'private' memory and the 'resident' memory chrome used, those memory are indeed taken, not just malloc-ed in a VSZ area waiting to be used.
- Is 100 MB the marginal memory cost to add one more tab when you already have a bunch open, or is it the memory usage when you have a single tab open? Don't forget that there is a baseline amount of memory usage for the application itself.
- Measuring memory usage is hard, doubly so for web browsers. You'd think it would just be about counting all the allocations, but shared libraries, sandboxes, and cache make it complicated. Just looking at the "memory usage" panels in Windows/macOS is often misleading: unfortunately I can't find the link at the moment, but there's a great article about how for Chrome, the number you get in those panels is wrong.
- In response to the increasing demands of web standards, browsers have basically become mini-operating systems, and you'd expect them to have memory usage to match.
- Websites are complicated: DOMs get bigger all the time, and it takes memory to store them, especially with the aggressive optimizations browsers use (see next point)
- Browsers use a lot of techniques to maximize performance as much as possible: aggressive caching and JS engines that favor space-time tradeoffs for faster execution being the two big ones. But remember that these are all a question of degree: if there is less memory available, they will use less and just go slower. The browser is just using the RAM available.
tl;dr: you may not be measuring it correctly, it's a difficult problem space, browsers deliberately use as much memory as is available to optimize for speed