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.pull/5512/head
parent
fa0d77c11d
commit
01ffa070ee
|
@ -678,7 +678,9 @@ class Pad {
|
|||
assert.equal(op.attribs, AttributeMap.fromString(op.attribs, pool).toString());
|
||||
}
|
||||
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) {
|
||||
const pfx = `(pad ${this.id} revision ${r}) `;
|
||||
|
|
Loading…
Reference in New Issue