8000 Comparing large JSON files · Issue #49 · xlwings/jsondiff · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Comparing large JSON files #49
Open
@FHantke

Description

@FHantke

Hi and thanks for the great library.
My use case is that I compare DOM trees that are represented as JSON files to find the difference between two similar webpages. Unfortunately, I have problems comparing two large JSON files (>300K) as the comparison never comes to an end (I stopped after 10 minutes).

I'm not sure whether this is due to a bug in the code and/or due to the complexity of the JSON files. While debugging a bit, I realized that many elements are compared multiple times with the same element (or also themselves). For instance the following element from diff1.json when compared to diff2.json (Example files).

diff1["childNodes"][0]["childNodes"][1]["childNodes"][29]["childNodes"][18]["childNodes"][0]["childNodes"][0]["childNodes"][1]["childNodes"][0]["childNodes"][1]["childNodes"][1]["childNodes"][0]["childNodes"][0]["childNodes"][2]["childNodes"][40]["childNodes"][0]
{'nodeName': '#text',
 'nodeValue': 'Tienda Kindle',
 'childNodes': [],
 'attributes': {}}

Is there any option in the library to compare large JSONs or do you have any recommendation how to approach this use case?
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0