121
@secondhandamps ·

What is my phone actually doing when it says optimising apps after an update Technology

Every big system update it sits there saying it is optimising, counts up through a few hundred apps, and takes fifteen or twenty minutes. Then the battery drains noticeably faster for a day. I have read that you should not interrupt it, but nobody says what it is doing. Is it scanning them, repairing them, uploading something? It feels like the phone is doing homework and will not say what the subject is.

7 answers Share
Report

Answering anonymously — a moderator will review it first.

  • @rack_unit_12 · 11mo ago · 3 replies

    It is translating your apps into a form your specific phone can run fast, and it has to redo it because the update changed the thing it translates against.

    Apps are shipped in a portable intermediate form so that one download works on many different phones. Running that form directly is slower, so at install time the phone compiles it into native machine code for its own processor and stores the result. That compiled copy is what actually runs when you tap the icon.

    When the system updates, the runtime libraries underneath change, so every one of those stored copies is stale and potentially invalid. Rather than have every app be slow the first time you open it, the phone does the whole batch up front. That is the counter you are watching.

    Nothing is being scanned for problems, nothing is being deleted, nothing is going anywhere off the device. It is a build job. The reason you should not interrupt it is simply that it is doing heavy work and yanking power mid write is a bad idea, not because something delicate is being repaired.

    The battery drain afterwards is the same story continuing. Caches and search indexes get rebuilt in the background over the following day, and then it settles.

    163
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @secondhandamps · 11mo ago

      That also explains why the phone feels sluggish if I skip it and start using it immediately. Nothing is broken, it is just compiling on demand while I use it.

      18
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
    • @crypt_cass · 11mo ago

      The everyday version: it is translating a book into your language once and keeping the translation, instead of translating each page every time you read it.

      39
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @crypt_cass · 11mo ago · 2 replies

    Modern versions are lazier than they used to be, which is why the step is much faster than it was five years ago. Instead of fully compiling everything on day one, phones increasingly compile the parts you actually use, based on watching how you use each app. So the count going up quickly is not it skipping work, it is it deferring the work you may never need.

    74
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @node_red_ned · 11mo ago

      Which is also why the first launch of a rarely used app after an update can still be slow. That one had not earned its compilation yet.

      22
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @node_red_ned · 11mo ago

    Same family of idea as a desktop rebuilding a search index after a big update, or a game shader compilation screen before you play. All of them are one time work done up front so the thing you actually do afterwards is fast.

    41
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @shopvac_ghost · 11mo ago

    If it takes twenty minutes with a few hundred apps, that is normal. If it happens on every reboot rather than after updates, that is not, and it usually means storage trouble.

    15
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report