• thingsiplay@beehaw.org
    link
    fedilink
    arrow-up
    8
    arrow-down
    2
    ·
    19 hours ago

    I think these incidents like a calculator leaking 32GB are not the problem in the industry. These are isolated issues, and fixable as you say. The bigger problem are many “smol” programs are written without performance in mind at all, with crazy languages like JavaScript, its bloated environment and runtimes and frameworks like React and a huge browser to run it. While they do not leak memory like crazy, they hog a lot and people accept it. If all programs are like this, then you end up doing 16GB for simple tasks (random number chosen for likes), while the 32 GB leaked app is corrected and now just uses 200 MB at max (just random number again, to illustrate my point).

    • entwine@programming.dev
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      12 hours ago

      While they do not leak memory like crazy, they hog a lot and people accept it.

      They do not leak memory at all. Using a lot of memory is not the same as leaking memory. And from a practical perspective, it doesn’t really matter if a calculator app on iOS uses a gigabyte or three of RAM, as the amount of multi-tasking a user can do on a phone is severely limited, and the operating system kills background apps when it needs to reclaim memory for the foreground.

      The bigger problem are many “smol” programs are written without performance in mind at all

      Do you have specific examples of this? The iOS calculator sucks, but it does not have performance problems. People who think every piece of software needs to be hyper-optimized are either unemployed (or should be) as they don’t get any work done, or they just don’t practice what they preach. IME, it’s usually beginners/novices who discovered what a “native” language is, like C++ or Rust, and are going through a phase. None of those people know how to actually optimize a program, haven’t even heard of Compiler Explorer, think “MESI” is a soccer player, and probably know more about TUI frameworks than profiling ones.