diff --git a/diff.js b/diff.js index 8bb4917..ba27eef 100644 --- a/diff.js +++ b/diff.js @@ -770,16 +770,19 @@ module.Types = { } - // same object... - // XXX this will essentially do a full diff of sub-objects, not - // sure if this is the right way to go here... - // ...this is not that big a dean as we are caching everything - // but still this is not obvious... + // check: if same/matching object... + // NOTE: this will essentially do a full diff of the input trees + // skipping only the top level, the actual A and B... + // NOTE: since actual A and B are not diffed here (as we start with + // bcmp(..) and not cmp(..), see above note), it makes no + // sense to do a cache check after this as we will exit this + // check with everything but the root cached/diffed... + // XXX not sure if this is efficient... if(bcmp(A, B, cmp)){ return null } - // builtin types... + // check: builtin types... if(this.DIFF_TYPES.has(A) || this.DIFF_TYPES.has(B)){ return this.handle('Basic', {}, diff, A, B, options) }