twoolf / circator

Metabolic Compass: A Circadian Monitoring Mobile Health Stack
https://www.metaboliccompass.com
Apache License 2.0
6 stars 1 forks source link

bringing app startup time to less than 400 ms #66

Open twoolf opened 8 years ago

twoolf commented 8 years ago

From WWDC they suggest it shouldn't be longer than 400 ms to start up the App from the cold (less from a warm state). Given the issues with HK needing (at least so far) to be in background threads for queries, it might make a lot of sense to store in App previous values and only update with the AnchorQuery outcomes. This would mean that all three screens could be based on values previously queried and stored, rather than queried as the App starts up.

sharedInstance might be the simplest, could also be a Realm database

(https://developer.apple.com/videos/play/wwdc2016/406/)

slides: http://devstreaming.apple.com/videos/wwdc/2016/406i3zbazbegkeh0udt/406/406_optimizing_app_startup_time.pdf