this post was submitted on 21 Jul 2023
632 points (97.7% liked)

Technology

59569 readers
4608 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
 

Firefox outperforms Chrome in speed for the first time according to a Speedometer assessment::undefined

you are viewing a single comment's thread
view the rest of the comments
[–] dustyData@lemmy.world 5 points 1 year ago

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.