Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large Arrays - Load More / Loading feature #1488

Open
kane-mason opened this issue Feb 7, 2024 · 0 comments
Open

Large Arrays - Load More / Loading feature #1488

kane-mason opened this issue Feb 7, 2024 · 0 comments

Comments

@kane-mason
Copy link

kane-mason commented Feb 7, 2024

General information

  • json-editor version: 2.6.1

Expected behavior

The array loads without the page becoming unresponsive

Actual behavior

The page becomes unresponsive

Steps to reproduce the behavior

The problem of performance when using large arrays seems to be well known and documented:

  1. https://github.com/json-editor/json-editor/wiki/Handle-Large-Arrays-with-the-JSON-editor
  2. Improve performance when dealing with large json content #252

The test data from two can be used to reproduce.

Suggestion

I do not have a solution to improving the performance, I am suggesting a different approach or workaround. Even the best performance improvements will have eventually have limitations since arrays could literally be any size.

So instead, why dont we rather check length of array and only show 50/100/200 (maybe configurable) at a time. We could have a Load More button, i think this is best, so you can view and edit the rest of the document and load the array onto the page as you wish. Otherwise a Loading ellipsis, the rest of the page is allowed to load and render, while the big array loads async, with clever work not to block the thread, this is probably a bit complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant