-
-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Problem
Currently, we require a full contract sync (for all contracts) when logging in from a new device. Depending on network conditions and contract size, this can take a long time, which may make the login process feel slow, and it can also make it unreliable (e.g., if syncing fails, logging in will fail). On mobile devices, users may need to manually keep their devices awoke for login to succeed.
There's no particular reason why we need to sync all contracts before deciding whether logging in should succeed or not. In fact, we don't block the entire application in other circumstances.
Solution
A longer term solution (*) to this is implementing #354 (or possibly #2595). PR #2595 (user-local snapshots) is currently on hold, but some of the work done (in particular, 93eafd5) would fix this issue, by relaxing the requirement on hard-sync.
That commit should work as is, but additional testing is needed to ensure that syncing really is resumable (e.g., in the event of network errors, suspended devices, etc.), and optionally to add some UI element (see #2595) indicating that the app is loading.
(*) Longer term in the sense of making logging in faster, but, even then, having contract syncs 'in the background' (whether a full sync or a snapshot sync) can still be useful.