You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
aakash1313
changed the title
Move deferrable tasks to Work Manager instead of Intent Service
[Perf Improvement] Respect device battery and other constaints by moving deferrable tasks to Work Manager instead of Intent Service
Apr 25, 2020
aakash1313
changed the title
[Perf Improvement] Respect device battery and other constaints by moving deferrable tasks to Work Manager instead of Intent Service
[Perf Improvement] Respect device battery and other constaints by moving deferrable tasks to Work Manager
Apr 26, 2020
@aakash1313 Runnables to consider moving to WorkManager:
UUIDGeneratorTask - Generates a new seed/uuid pair. This can involve generating several pairs via generateSeedHelper() if the user turned off their phone for some time between the last time the seed/uuid was generated. To use the new uuid, it turns off and turns on the Bluetooth transmitter.
BluetoothScanHelper - the logic around this is that it scans for Bluetooth IDs every 5 minutes for 10 seconds. So that part of the logic should still work after this refactor.
RegenerateSeedUponReport is a potentially longer running AsyncTask, might be good to defer this.
To provide some context for this, when the user submits an infection report. We delete all their previous seeds and UUIDs, and we regenerate 2 full weeks of seeds and UUIDs again (it's not that many only ~1300), but still we'd probably want to not make this an AsyncTask since it's doing a bunch of database inserts for each of the seeds/uuids it's generating.
@justinklchan : I think these all need to be done in less than 15 mins or urgently, it would be better move UUIDGeneratorTask, BluetoothScanHelper and RegenerateSeedUponReport to Tasks. Let me know what you think?
No description provided.
The text was updated successfully, but these errors were encountered: