• CameronDev@programming.dev
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    18 hours ago

    Size on disk doesn’t correlate to memory usage or load time. You can get a very small on disk size by compression, or downloading the main executable at runtime.

    • Feyd@programming.dev
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      21 hours ago

      The size of the main binary and all the libraries loaded does determine the starting point of the memory usage, but then doing things like loading files are going to also use memory and there are many strategies for optimizing for speed, memory usage, disk size that have tradeoffs between them. Anyway the point is that the size of the program itself isn’t irrelevant even though it isn’t the only factor in memory usage.

      • CameronDev@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        18 hours ago

        Even the linked libraries may not contribute anything, if they are already loaded and shared amongst other processes. There are so many factors and trade offs that you cant really make any assumptions based off just the executable size.

    • BCsven@lemmy.ca
      link
      fedilink
      English
      arrow-up
      8
      ·
      22 hours ago

      The premise is probably if you can optimize the code to be small, you are probably also optimizing how it runs too. Rather then just bloat up everything

      • CameronDev@programming.dev
        link
        fedilink
        English
        arrow-up
        3
        ·
        18 hours ago

        Once you start optimizing for one aspect, others become less important. In this case, they are doing a few hacks to get to 2.5kb, which do impact runtime performance. A few users report it using 500mb at runtime due to the compression :/

        • BCsven@lemmy.ca
          link
          fedilink
          English
          arrow-up
          3
          ·
          10 hours ago

          Well that sucks, although I assume that’s way better than the AI bloated version that now comes with Windows.

    • ch00f@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      ·
      22 hours ago

      Sure. I wasn’t thinking of something like .kkreiger. I assumed that a small simple text editor would use a similarly small amount of memory. Shocked it ballooned so big. Sorry can’t read the article at the moment.