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

Problem displaying large arrays #132

Open
StephanSchwebel opened this issue Oct 31, 2022 · 4 comments
Open

Problem displaying large arrays #132

StephanSchwebel opened this issue Oct 31, 2022 · 4 comments

Comments

@StephanSchwebel
Copy link

StephanSchwebel commented Oct 31, 2022

I have a json file that basically contains an array of a few hundred thousand bytes (integers). It takes a very long time to view this kind of data in JSToolNpp JSON Viewer. I could not determine the exact time it takes as I usually stop the process after a few minutes.
During this operation Notepad++ itself is not responding (it has "...(Not Responding)" in the title bar).
The attachment (extension was changed to .txt to statisfy github) is a minimal file that demonstrates this problem.
imgage_data.txt

@sunjw
Copy link
Owner

sunjw commented Oct 31, 2022

No, it cannot render such large JSON in tree view.

@StephanSchwebel
Copy link
Author

I don't quite understand.
In your judgement, is this issue a bug?
Are you considering doing anything about it?

Personally I don't think the behaviour is acceptable, considering that the plugin promises:
"A JSON tree viewer. The JSON tree viewer for Notepad++ can handle >10MB JSON file easily"
Also making the the parent application inoperable for long periods is not good at all.

@sunjw
Copy link
Owner

sunjw commented Nov 1, 2022

No, it's because tree view control used in NPP. It cannot handle such many nodes, JSToolNpp can analyze even larger JSON file, but tree view control cannot handle that.

@molsonkiko
Copy link

FWIW my JsonTools plugin has come up with a pretty reasonable and easy-to-implement solution for dealing with such large arrays, namely to only include 10,000 evenly-spaced elements from very large JSON objects or arrays. This makes the tree view efficient in all cases. For example, for a 1 million-element array, the tree view would display every 100th element in the array. It's not perfect, but it's the only solution I could come up with that avoids eating all available memory and hanging forever.

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

No branches or pull requests

3 participants