Optimize sync slightly
parent
73e5bb6672
commit
0959a37a83
|
@ -20,8 +20,6 @@ export async function ensureSpaceIndex(ds: DataStore, system: System<any>) {
|
|||
console.info("Full space index complete.");
|
||||
await markFullSpaceIndexComplete(ds);
|
||||
indexOngoing = false;
|
||||
} else {
|
||||
console.info("Space index is up to date");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -255,7 +255,7 @@ export class Client {
|
|||
this.syncService.start();
|
||||
|
||||
// We're still booting, if a initial sync has already been completed we know this is the initial sync
|
||||
const initialSync = !await this.syncService.hasInitialSyncCompleted();
|
||||
let initialSync = !await this.syncService.hasInitialSyncCompleted();
|
||||
|
||||
this.eventHook.addLocalListener("sync:success", async (operations) => {
|
||||
// console.log("Operations", operations);
|
||||
|
@ -275,7 +275,7 @@ export class Client {
|
|||
ensureSpaceIndex(this.stateDataStore, this.clientSystem.system).catch(
|
||||
console.error,
|
||||
);
|
||||
} else {
|
||||
} else { // initialSync
|
||||
// Let's load space scripts, which probably weren't loaded before
|
||||
await this.clientSystem.loadSpaceScripts();
|
||||
console.log(
|
||||
|
@ -284,6 +284,7 @@ export class Client {
|
|||
ensureSpaceIndex(this.stateDataStore, this.clientSystem.system).catch(
|
||||
console.error,
|
||||
);
|
||||
initialSync = false;
|
||||
}
|
||||
}
|
||||
if (operations) {
|
||||
|
|
Loading…
Reference in New Issue