• xan1242@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    38
    ·
    8 months ago

    It’s specifically about the efficiency of the usage. If it’s not used effectively, then it really is a waste.

    And we all know how efficient the Web is nowadays…

    • drem@lemmy.world
      link
      fedilink
      arrow-up
      1
      arrow-down
      2
      ·
      8 months ago

      Why could ram usage be a waste? I thought only the allocation is the performance heavy part, allocated ram does not cost extra performance.

      • xan1242@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        11
        ·
        8 months ago

        I’m referring to the philosophy behind the usage of said allocated ram.

        If you allocate 5 cookie jars to store 1 cookie in each jar, then that’s not good.

        If you store 2 cookies per jar, that’s better already, but still kind of crap.

        If the websites keep putting rocks in those jars, then you’ll obviously run rampant with usage. (Read: https://tonsky.me/blog/js-bloat/ )

        The goal is to store as many cookies in least amount of jars. You might crumble them down and reconstruct them later (compression and/or clever code) but that could take more brain (processing) power (of which we kinda have, especially on the desktop).

        As you’ve said, it’s often a tradeoff between processing power and memory usage and depending on the application, you can configure things the way you need them (at least when you’re coding it).