josdejong / svelte-jsoneditor

A web-based tool to view, edit, format, repair, query, transform, and validate JSON
https://jsoneditoronline.org
Other
814 stars 108 forks source link

large json object hang up chrome in tree mode #438

Closed yanshuai closed 1 month ago

yanshuai commented 1 month ago

I use svelte-jsoneditor in tree mode, for a json object having 40000 children k-v,it will hang up chrome, how can I limit json tree that show at most 1000 children default(if over 1000 children, then show click button to loading next 1000 children)

josdejong commented 1 month ago

For arrays, the editor only renders the first 100 items, and allows to expand other items. That keeps it fast for large arrays since the rendering is the heaviest part. For objects, there is not yet such an optimization because it isn't a common use case. It would be great of course to implement the same mechanism for objects.

I'll move this idea to the ideas section.