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

  • mysoulishome@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    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.

    • dustyData@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      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.