667
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 21 Jul 2023
667 points (97.6% liked)
Technology
59086 readers
2311 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
Hmm…interesting. I didn’t know Chrome was smart enough to use less ram if the system is taxed. Figured it just always used a shit ton…which sucks if you’re editing videos or something and need to open a browser or something.
That's because it isn't as smart as it sounds. Like with everything in programming there's a tradeoff being made. This behavior runs the risk of making the computer unresponsive while the garbage collector and the scheduler run after each other trying to clean house. “Unused memory is wasted memory” is kind of a fallacy. Overextending and requesting the OS for more memory than is available will always hurt performance. Ram operations aren't free, however much software engineers like to pretend they are. Neither are scheduling tasks. They cost time and responsiveness and can add up fast.
One of the immediate consequences, for example, is that if the users wants to interact with one of the discarded tabs, now the browser has to re-download the page (internet IO is insanely slow compared to disk operations), reload it to memory from disk cache which can also be slow—specially if the disk is busy with other IO—discard other older tabs to make room (compounding the problem), be slapped in the wrist because the OS says “No, you can't have DaVinci's RAM!” scramble for some more ram from some other idle task, reestablish the page state which might've been lost. Etc. it becomes messy fast, and now the user is frustrated that “I was reading this page a minute ago, why is it taking so long to load again, is my OS frozen? Damn I lost the forms I had partially filled?” So no, ballooning memory until it's all used up is not inherently always a good strategy. Nevermind that Chrome (and FF as well) have been found to have severe memory leaks that come and go.