Part 6: Kick-off account manager initialization after visual completeness
In order to hide the time it takes for the account manager to be initialized (which always involves disk IO, and often network IO), let's kick it off after "visual completeness". This makes sure that for most users, by the time they interact with the account manager-related functionality (e.g. in Settings), it's ready to go. Also, for signed-in users, this will establish background sync workers.master
parent
057e28d4e4
commit
6c38b77315
|
@ -162,6 +162,12 @@ open class FenixApplication : LocaleAwareApplication() {
|
|||
components.core.passwordsStorage.warmUp()
|
||||
}
|
||||
}
|
||||
// Account manager initialization needs to happen on the main thread.
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
logElapsedTime(logger, "Kicking-off account manager") {
|
||||
components.backgroundServices.accountManager
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue