Closed paterczm closed 7 years ago
Instead of comparing lenghts, why not use jiff to compare, and then if docs are different, use jsoncompare to get the differences? I think this is the way it is done in migrators.
Instead of comparing lenghts, why not use jiff to compare, and then if docs are different, use jsoncompare to get the differences? I think this is the way it is done in migrators.
Already doing that, but still running out of memory because of huge inconsistencies in product result sets.
The logic is following:
Yes, saw that
On Tue, Mar 21, 2017 at 7:40 AM, Marek notifications@github.com wrote:
The logic is following:
- Use jiff to compare responses. If equal, return.
- If different, check size of responses.
- If size < 64kB, use JSONCompare to produce inconsistency (diff) for analysis.
- If size >= 64kB, use Jiff to produce inconsistency (diff) for analysis.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lightblue-platform/lightblue-migrator/pull/407#issuecomment-288080976, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgDDd0pb7FfuUavZD-ziDHY4k5sn0lSks5rn9NfgaJpZM4MjzmY .
Service facade uses 2 libraries to diff api responses: JSONCompare and Jiff. Jiff is faster and consumes less memory, but provides less details (stops on first diff encountered and does not describe array element differences). This change will use JSONCompare to report for all responses under 65kB and Jiff for bigger ones (configurable).