Pre-cache max unreserved player count on process startup.
This call was taking up to 20ms to run on the first time we would load a conversation. Adding a post-render call to app launch reduces this time to 0ms, as the data has been cached by the system. Doing it on a background thread means we do not pay for it in TTFF.
This commit is contained in:
parent
564b9f47ee
commit
3738daf4a8
1 changed files with 1 additions and 0 deletions
|
@ -214,6 +214,7 @@ public class ApplicationContext extends MultiDexApplication implements AppForegr
|
|||
.addPostRender(GroupV2UpdateSelfProfileKeyJob::enqueueForGroupsIfNecessary)
|
||||
.addPostRender(StoryOnboardingDownloadJob.Companion::enqueueIfNeeded)
|
||||
.addPostRender(PnpInitializeDevicesJob::enqueueIfNecessary)
|
||||
.addPostRender(() -> ApplicationDependencies.getExoPlayerPool().getPoolStats().getMaxUnreserved())
|
||||
.execute();
|
||||
|
||||
Log.d(TAG, "onCreate() took " + (System.currentTimeMillis() - startTime) + " ms");
|
||||
|
|
Loading…
Add table
Reference in a new issue