• brucethemoose@lemmy.world
    link
    fedilink
    English
    arrow-up
    19
    ·
    edit-2
    2 days ago

    I mean, Android isn’t just Java, and iOS has plenty of bloat. They both run gnarly cross-platform frameworks.

    A bigger factor is probably their approach. iOS started life as “one app runs at a time” and gradually grew sleeping and background jobs as features. Android (mostly) allowed apps to do pretty much anything in the background, and only recently started cracking down on the worst abuses.

    • BorgDrone@feddit.nl
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      6
      ·
      2 days ago

      When using garbage collection there is a trade-off between memory usage and performance. If you run the garbage collector a lot, memory usage is low but performance is crap (because it’s spending a lot of CPU cycles on the GC), if you rarely run it the performance is good but memory usage goes up by a lot (because memory isn’t released often enough). You have to pick a point between those two extremes.

      Turns out that if you want to have similar performance as a non-GC language you use about 3 times as much RAM compared to the non-GC language.

      • tomalley8342@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        2 days ago

        Turns out that if you want to have similar performance as a non-GC language you use about 3 times as much RAM compared to the non-GC language.

        How does this work with respect to your previous comparison with iOS now that the iPhone 17 comes with 8GB RAM? Are you implying that no Android phones will reach performance parity with iPhones until they start shipping with 24GB RAM?

        • BorgDrone@feddit.nl
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          2 days ago

          No, it’s not as simple as that. A large part of Android is written in C++ and not Java or Kotlin. Think of things like the web browser. Also things like more demanding games will be written in C++ so they won’t be affected by this at all.

          It’s mostly the simpler Java/Kotlin based apps, which will be a majority of the apps on the Play Store. They don’t necessarily need the performance, but they will be more wasteful with memory than comparable iOS apps.