reworked getOperations (decrease size of sent operations, fixe some gc issues). garbageCollectOperation now sets origin to the direct left operation, if possible

This commit is contained in:
Kevin Jahns
2017-07-03 23:19:11 -07:00
parent 66de422749
commit 382d06f6d4
5 changed files with 38 additions and 28 deletions

View File

@@ -30,12 +30,14 @@ export async function compareUsers (t, users) {
await wait(100)
}
await flushAll(t, users)
await users[0].db.garbageCollect()
await users[0].db.garbageCollect()
await wait()
await flushAll(t, users)
var userTypeContents = users.map(u => u.share.array._content.map(c => c.val || JSON.stringify(c.type)))
await users[0].db.garbageCollect()
await users[0].db.garbageCollect()
// disconnect all except user 0
await Promise.all(users.slice(1).map(async u =>
u.disconnect()