feat: improve initial load performance on mobile (#2126)

This commit is contained in:
Mo
2023-01-03 14:15:45 -06:00
committed by GitHub
parent a447fa1ad7
commit 3c332a35f6
59 changed files with 868 additions and 3003 deletions

View File

@@ -133,7 +133,7 @@ export class SNSingletonManager extends AbstractService {
* of a download-first request.
*/
if (handled.length > 0 && eventSource === SyncEvent.SyncCompletedWithAllItemsUploaded) {
await this.syncService?.sync()
await this.syncService?.sync({ sourceDescription: 'Resolve singletons for items' })
}
}
@@ -190,7 +190,7 @@ export class SNSingletonManager extends AbstractService {
}
})
await this.syncService.sync()
await this.syncService.sync({ sourceDescription: 'Find or create singleton, before any sync has completed' })
removeObserver()
@@ -224,7 +224,7 @@ export class SNSingletonManager extends AbstractService {
const item = await this.itemManager.emitItemFromPayload(dirtyPayload, PayloadEmitSource.LocalInserted)
void this.syncService.sync()
void this.syncService.sync({ sourceDescription: 'After find or create singleton' })
return item as T
}