JSON-Viewer icon indicating copy to clipboard operation
JSON-Viewer copied to clipboard

npp gets hanged when "Show JSON Viewer" option is clicked for large JSON files.

Open sud0bug opened this issue 8 years ago • 12 comments

NotePad++ gets hanged when "Show JSON Viewer" option is clicked for large JSON files. But "Format JSON" option is working fine. I tried to open JSON Viewer window for a .geojson file. The geojson file is almost 718kb in size

sud0bug avatar Aug 02 '17 05:08 sud0bug

I also have this issue - the plugin chokes the CPU core for seemingly indefinitely when trying to view a large, 20MB in my case, json file.

tritium21 avatar Dec 25 '17 07:12 tritium21

Check the latest release in github's release section. v1.30a

kapilratnani avatar Jan 10 '18 04:01 kapilratnani

@tritium21 @johnsoncherian try the new build. Also, share the big JSON files, if possible.

kapilratnani avatar Jan 10 '18 12:01 kapilratnani

It still chokes on my data. I cant share the file, but it has the following structure:

{
    "data":{
        "short string identifier":{"path": "short string", "name": "short string", "dump": "avg 2k len string of base64 encoded data"},
        # 800 instances of previous
    }
}

tritium21 avatar Jan 10 '18 21:01 tritium21

as of now i've tested with 2MB of data, it works under a second. Will try to generate bigger files.

kapilratnani avatar Jan 11 '18 04:01 kapilratnani

I think the issue is because of dump field. The 2kb base64 data is too much. May be i should consider limiting the size of text in the tree node. Anyway this big text is not readable/usable in a tree view. BTW, how is the performance of JSON format?

kapilratnani avatar Jan 12 '18 04:01 kapilratnani

It hour-glasses indefinitely with JSON format for me.

tritium21 avatar Jan 12 '18 05:01 tritium21

@tritium21 i tried generating a text file with the specifications you mentioned. It kind of worked for me. Format and Tree view both takes less than 2 seconds with the new build from the releases section(1.30). large.zip I am attaching the generated json file.

kapilratnani avatar Jan 17 '18 18:01 kapilratnani

Does not work for me, the latest version. JSON file is around 4MB length. The structure: array of objects. Around 4k array items. File is around 150k lines of data. Item structure: { "Id": "869b0f79-fb53-439b-a300-fff01d45f0bb", "Field": "111 dddd gggg", "Field": "", "Field": "", "Field": "", "Field": "", "Field": true, "Field": 150, "Field": "2018-02-02T20:59:59", "Field": 24, "Field": 500, "Field": 1440, "Field": 1500, "Field": null, "Field": "8ad065fc-45d6-8901-e238-22439300ef99", "Field": "5e675984-4b81-435c-a5a3-c173578c3814", "Field": "00000000-0000-0000-0000-000000000000", "Field": null, "Field": "2018-02-01T21:00:00", "Field": "", "Field": "2018-02-01T21:00:03.583", "Field": [ { "Field": "7733474882", "Field": 11181 } ], "Field": 150, "Field": 1, "Field": false, "Field": null, "Field": null, "Field": 786961, "Field": false, "Field": [ 6, 10 ] }

Cassandra-d avatar Feb 08 '18 13:02 Cassandra-d

I am also getting this with a 3.44MB File with about 633k lines.

TheMeq avatar Aug 24 '18 09:08 TheMeq

Nevermind, it works with latest version, NPP Plugin Manager has old version on it.

TheMeq avatar Aug 24 '18 09:08 TheMeq

Thanks for confirming @TheMeq , will push the latest version to Plugin Manager soon.

kapilratnani avatar Aug 29 '18 03:08 kapilratnani

Fixed in 1.3 release. If the issue still persist. Please open a new issue.

SinghRajenM avatar Sep 21 '22 02:09 SinghRajenM