mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge pull request #14205 from mvogttech/ejson-optimize_equals
perf(ejson): early bail-out on key count mismatch in EJSON.equals
This commit is contained in:
@@ -611,6 +611,9 @@ EJSON.equals = (a, b, options) => {
|
||||
let ret;
|
||||
const aKeys = keysOf(a);
|
||||
const bKeys = keysOf(b);
|
||||
if (aKeys.length !== bKeys.length) {
|
||||
return false;
|
||||
}
|
||||
if (keyOrderSensitive) {
|
||||
i = 0;
|
||||
ret = aKeys.every(key => {
|
||||
|
||||
Reference in New Issue
Block a user