Pad: Only check getKeyRevisionNumber()
at key revisions
Checking every revision is more of a unit test than a consistency check, and limiting checks to key revisions should improve performance considerably.
This commit is contained in:
parent
fa0d77c11d
commit
01ffa070ee
1 changed files with 3 additions and 1 deletions
|
@ -678,7 +678,9 @@ class Pad {
|
||||||
assert.equal(op.attribs, AttributeMap.fromString(op.attribs, pool).toString());
|
assert.equal(op.attribs, AttributeMap.fromString(op.attribs, pool).toString());
|
||||||
}
|
}
|
||||||
atext = Changeset.applyToAText(changeset, atext, pool);
|
atext = Changeset.applyToAText(changeset, atext, pool);
|
||||||
assert.deepEqual(await this.getInternalRevisionAText(r), atext);
|
if (r === this.getKeyRevisionNumber(r)) {
|
||||||
|
assert.deepEqual(await this._getKeyRevisionAText(r), atext);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const pfx = `(pad ${this.id} revision ${r}) `;
|
const pfx = `(pad ${this.id} revision ${r}) `;
|
||||||
|
|
Loading…
Reference in a new issue