New issue
Advanced search Search tips

Issue 766726 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 767177
Owner:
Closed: Sep 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 766734



Sign in to add a comment

Extract resources in the background when possible

Project Member Reported by estevenson@chromium.org, Sep 19 2017

Issue description

There are several cases where we could pre-emptively extract pak files to improve start up time, including:
  * After clearing package data
  * After updates/installs
  * After language changes
  * After boot

There are broadcast receivers for all of these, but only ACTION_MY_PACKAGE_REPLACED is available for O+, so we'll need to use another approach. 

One approach is to use Background Task Scheduler to periodically check if we need to extract pak files and kick off extraction when necessary. It isn't perfect; we aren't actually listening for the events so we might end up missing opportunities to pre-extract these files but it's still more performant than the current setup. 
 
How long does it take to extract?
Don't love the idea of polling to check for this rare scenario. 
If a user clears app data, I don't think we should be re-extracting until it's necessary.

I think updates are really the only event in this list that happens with any sort of regularity (I'd guess it's the cause of needing to extract 99% of the time), so I think just relying on ACTION_MY_PACKAGE_REPLACED is sufficient.
Blocking: 766734
#2 sgtm
Cc: -torne@chromium.org
Mergedinto: 767177
Status: Duplicate (was: Assigned)

Sign in to add a comment