Replace custom HTML with a JSON view
In one of my nodes, there's a huge amount of JSON formatted data returned by an API (about 600KB of data, including several base64 encoded images). Along with all of the other nodes in my spur, this causes the entire frontend to be extremely slow, or even freeze, after the workflow is run and all the outputs are rendered.
After replacing with this JSONView, the performance is far better.
I don't have any benchmarks or anything for this, so feel free to reject it. I just thought it might be useful in general.
[!IMPORTANT] Replaces custom HTML with
JsonViewinNodeOutputDisplay.tsxto improve performance for large JSON data.
- Behavior:
- Replaces custom HTML rendering with
JsonViewinNodeOutputDisplay.tsxfor JSON data.- Improves performance for large JSON data sets, such as those with base64 images.
- Imports:
- Adds
JsonViewand its CSS fromreact18-json-view.- Misc:
- Removes custom HTML and button logic for JSON rendering in
renderJsonObject().This description was created by
for 72d3550ce8500f8b46ee3360036ebe2996dc6930. It will automatically update as commits are pushed.
Thank you very much! We'll take a look
Thanks for the PR @rajeev . Merging this!