• BorgDrone@feddit.nl
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    11
    ·
    edit-2
    3 days ago

    You’d have to rewrite about 17 years worth of Android software for that. They chose a garbage collector based programming language/VM, can’t replace that with something more efficient without basically rewriting all software. Looks like Apple made the right choice here by going with a reference counting scheme.

    • brucethemoose@lemmy.world
      link
      fedilink
      English
      arrow-up
      20
      ·
      edit-2
      3 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.

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

          Eh, I’m afraid its doing more than nothing. Same with basically every giant app that sits in the background.

          They’re datamining the snot out of you. With the ostensible excuse of “analytics” and being able to send notifications.

      • BorgDrone@feddit.nl
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        6
        ·
        3 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
          ·
          3 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.

    • cron@feddit.org
      link
      fedilink
      English
      arrow-up
      8
      ·
      3 days ago

      Not too long ago, 4 or 6 GB ram were plenty. What happened that modern Android „needs“ that much memory?

      • Stefen Auris@pawb.social
        link
        fedilink
        English
        arrow-up
        8
        ·
        3 days ago

        I think we’re starting to see people using their phone as their primary computing device and are asking more and more from it as they abandon laptops and desktops

      • zurohki@aussie.zone
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        1
        ·
        3 days ago

        High resolution graphical assets are big. That’s why we’re now getting 32GB video cards in desktop PCs.

        Sure, nobody’s doing super high end graphics on a phone, but it doesn’t take much high resolution art to take a big bite out of that 6GB. Phones don’t have separate system and video RAM, remember.

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

        Android has traditionally been very stingy with memory. Like really stingy. It depended on the device but back in those days you could not assume your app could use more than 16MB of RAM. That was the default heap size limit. High-res devices often had the limit set to 24MB.

        Only starting with Android 3.x apps could request more (largeHeap setting in the manifest).

        By contrast, iPhones around that time had 2GB of RAM but an app could use almost all of it.