94 points · by nachtigall · 9y ago · 98 comments
I see people complaining of memory issues in browsers all the time though, what causes these issues, and how is it I never see them?
:)
Closed the pages, installed uBlockOrigin, and I had my browser back.
Sorry NYT, but if you ever want me to see an ad again (I'm not opposed to them), you're going to have to do something about your pages, and you're going to have to police your ad networks for my privacy and protection. (But, I suppose it's specifically my privacy that you're selling, so I guess the wait will be long.)
This would hopefully align incentives: we understand that ads are necessary for the web, but ad makers have to work on efficiency to increase revenue. This would theoretically be like "AMP for ads". If you use too much memory, your ads drop because you keep crashing on the page (just the ad of course).
If you wanted to be perverse, you could have a limit on TOTAL memory all ads could use on a page, so you end up creating group pressure on any individual that's not playing nice (they might start demanding not to be served on the same page as those ads etc). But maybe this is too much. Just limiting the total amount of "memory usage" is a good start.
The important thing here is that it hopefully leads to the world we actually want: REASONABLE ads that don't require crazy measures that end up hurting the sites we love. Browsers COULD ship this by default without hurting the ecosystem.
That's easily done by installing an adblocker! Can't beat memory limit = 0.
we understand that ads are necessary for the web
Well, hold on now. The web existed before ads did, and it was pretty cool. If ads disappeared, we'd still have a web - lots of its most annoying parts would disappear, and we'd have a lot of readjusting to do, but what we'd end up with would keep all the best parts of what we have now, because the best parts of the web aren't based on ads.
This assumes you can identify ads, or that they identify themselves.
With 10 windows and a handful of tabs each, I'm close to using up 16GB of ram and sometimes run out.
Even if you use blank documents, the contrast is striking.
Browsers should really add checks for memory leaking pages.
Of course, then again, I technically have multiple presences from Google's perspective as I'm technically a student at the moment too. The school's e-mail is handled by Google Apps. Handling that all through a client is easier than trying to flip between browser pages that I can't keep straight.
RAM use varies from about 1GB to 2.5GB. It slows down above that, which you can only solve by restarting the browser.
I bought another 8GB so I reckon my 2011 machine will be good for another few years. It should last a decade, really.
Tabs are my 'pending reading queue'.
1) Start investigating a topic. MMB the first few google results that look relevant/useful.
2) Ctrl+Tab. I'll be back to that google query in short order if they weren't.
3) Ctrl+W the first few results - they weren't useful.
4) Oh, hey, here's something. Read, scan down, and MMB 'future reading'.
5) Unread 'queue' (everything right of my current tab) is slowly growing. There will sometimes be duplicates. Read 'queue' that I want to keep open for reference / high level overview / branching off of (most things left of my current tab) also grows.
6) An hour later, I'm perhaps up to 50 tabs. Often less, but sometimes more.
Oh, here's a high priority question/bug/problem/task from my valued coworkers. I recall relevant documentation, but not the exact keywords. I open a new window, and repeat the process. Oh, hey, lunchtime! Interesting discussion over lunch prompts me to investigate another related topic. I open a new window when I return to the office.
Aha, results! A whirlwind of coding
Oh, end of day already? Hmm, I have 5 chrome windows open... LET THE HARVEST OF BOOKMARKS COMMENCE! Hundreds of tabs becomes 0 as I do a quick glance kneejerk yay/nay on bookmarking every one of them and doing some kind of basic organization by topic. Other coworkers use browser extensions to save their tabs instead, instead of engaging in this organization ritual.
The computers shut off. The lights go out. The sun has set, and silence descends, despite the open office floorplan.
...and then, some time later... a new day dawns...
> Why not just open them when you need them?
I don't want to wait for the webpage to finish loading when I switch to it. I don't have a clever way to rebind MMB to bookmarking new pages that I haven't even visited yet. I don't want my bookmarks cluttered with potentially useless tangent topics - I already have too many (thousands? tens of thousands?)
I have 32GB of RAM. I can spare a few gigs for Chrome.
Firefox is among the first programs I open after logging in, and I usually leave it running until I either shutdown/reboot or a browser update makes me restart it. And I tend to only reboot my computers (both at home and at work) when system updates make it necessary. Often I will open a page and then just leave the tab open for "later" (which might be hours or days later).
It's not uncommon for Firefox to grow to 1-1.5 GB in size. Personally, I consider that an acceptable tradeoff, given its usefulness, but it is a rather heavyweight program.
(On lower-end machines I prefer either dillo or w3m. Pages with layouts that can be even remotely considered "fancy" will look kind of strange in dillo, but it is incredibly fast, and I have never seen it use more than 150MB of RAM.)
Not sure exactly but that's my experience at least.
If you don't mind me asking, why do you do this? I can't think of a reason to need to be logged into that many Google accounts at one time.
...and the code, and all of the state from the objects that are, you know, "currently resident in main memory" while that logged in account is being accessed, and, and, and.
I'm sure a fair amount of the plugins people install are actually what lead to the large memory consumption. That, and the hundreds of tabs they leave open. I feel like tabs have become the new bookmark. Maybe what we really need is some sort of ephemeral bookmark system?
Now I use FastMail (and am employed there too); its memory usage is 8–25MB (which is less than the vast majority of sites, simple static content websites included!). And it’s much faster too.
Is it surprising that Edge might bypass the hosts file?
It surprises me, as I thought all outgoing requests were routed through `/etc/hosts` or equiv, but I don't spend too much time in Windows these days.
I'm on Aurora (developer edition) maybe it was related to some recent bugs.
The Chromium codebase has no less than 5 different string classes, is riddled with layers and layers of virtual function calls wrapping older interfaces, has an antiquated threading model that defines a "Main thread" because various ancient WebKit code scattered throughout the code base relies on global variables, etc.
It's pretty surprising to me that it works as well as it does.
Linux (Mint 18.1) uses about 1/2 the memory of Windows 10, so I run Linux.
Haven't set up swap (flash memory only), so when I do exceed the RAM limits, things just grind to a halt, usually requiring a reboot.
Fun little portable system. :-)
OSX soaks up most of your ram at all times and will put programs in the background into a sleep state. When they are woken up everything is transitioned smoothly like it was already running as it's state is in ram. The OS will also free up ram if it's needed by a newly launched program. Hence when judging the available memory on OSX you look at "Memory Pressure" and not available ram.
I'm not sure about the exact heuristics used by Chrome, but I think they do something like one process per origin.
edit: as noted below it's one process per domain.
The same origin policy already works fine, when talking content-to-content.