Page MenuHomePhabricator

Improve 7.3.1 upgrade path launch times
Closed, ResolvedPublic

Description

7.3.1 showed a significant slowdown in launch times when upgrading from an app version with saved articles:

https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/iOS/Engineering_Pre-release_Checklist

We should always try to reduce time spent didFinishLaunching, as well as reduce time tying up the main thread, to prevent watchdog terminations.

QA Testing Notes

On both a high powered device and low powered device, please try to build up a large database of items in the App Store 7.3.0 version, then upgrade to 7.3.1 (2318) via TestFlight. The best way to build up a large database of items is to log into an account with a lot of synced saved articles. Once those articles finish downloading to device, try updating. Confirm app launches without crashing and saved articles still work while offline.

Related Objects

Event Timeline

Current 7.3.1 first launch metrics, for a user with a year's worth of Explore feed data populated, and 1000 Saved Articles (iPhone 7).

Total time to initial frame rendering: 8.094 seconds

After PR changes: https://github.com/wikimedia/wikipedia-ios/pull/4553

0.234 seconds*

*It's worth noting that it still takes about 8 seconds before a user sees the Explore feed. The data still takes a while to migrate (unavoidable), but now we are preventing the launch method and main thread from hanging. This migration happens asynchronously, while the user sees our existing "Updating..." animation.

out.gif (1×750 px, 3 MB)

This launch time only happens the first time they launch (due to migration) - subsequent launches are ~2 seconds on the splash screen.

Mazevedo added subscribers: ABorbaWMF, Mazevedo.

@ABorbaWMF assigning this one to you as it'll ship on 7.3.1

Seddon triaged this task as Medium priority.Jul 5 2023, 6:41 PM
Seddon moved this task from Needs Triage to Bug Backlog on the Wikipedia-iOS-App-Backlog board.
Tsevener updated the task description. (Show Details)