Skip to content

Slow performance when loading large JSONs and toggling collapse/expand #138

Open
@gurupras

Description

@gurupras

I think the entire JSON tree is being re-rendered every time one item is toggled. This does not scale well for large JSONs.
Additionally, the component struggles to display a JSON of size ~21MB 🙁

One thing I did notice was that most of the time is being spent in jsonFlatten and/or flatData computation. Is there anything we can do to improve both of these? Given that jsonFlatten is not touching the DOM in any way, can we parallelize the work using WebWorkers? I'm happy to work on implementing it, but I don't fully understand the codebase yet.

Branch: 1.x

json-load-performance.mp4
json-toggle-performance.mp4

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions