From f27bb40275a181c947863d87475a75632d463460 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 28 Jul 2018 01:24:53 +0300 Subject: [PATCH] some notes... Signed-off-by: Alex A. Naanou --- diff.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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) }