Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

OT - json file size

LEGEND ,
Nov 19, 2021 Nov 19, 2021

What do developers think the maximum file size of a json file should be before it starts to slow the interaction process, find, filter, forEach, etc javascript workflow down, or doesnt it matter? 

 

 

 

647
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 19, 2021 Nov 19, 2021

I think parsing and string size limits depend on the platform & server environment.

 

JSON files have a maximum limit of 18,446,744,073,709,551,616 characters.  That's Eighteen quintillion, four hundred and forty-six quadrillion, seven hundred and forty four trillion, seventy three billion, seven hundred and nine million, five hundred and fifty one thousand, six hundred and sixteen.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 19, 2021 Nov 19, 2021

Thanks for that, I'd still be interested to know in terms of max kbs/mbs what the json file size should be. I could be wrong but I would have thought the more lines of text in it the more time it would take to process a request. Just trying to figure out if there is any suggested max-size before things start slowing down.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 19, 2021 Nov 19, 2021

This is an old study, but it should be an indication:

How Big is TOO BIG for JSON? - Josh Zeigler

 

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 20, 2021 Nov 20, 2021

Thanks Ben,

 

I guess in my case it would be imaterial as l only have about 150 products to deal with. Although each object would contain much more text than the example object tested it still should not effect the efficiency.

 

My initial thoughts were to break up the information in different api calls but if l can bring it all back in one json file without loss of speed when querying it l would prefer that. Once l get 25 percentage of the information into the database l can bring it back as a json file and see how large that is in kbs then times it by 4 and check the size of the file against the listed examples.

 

Thanks for your input and the link.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 20, 2021 Nov 20, 2021

I never thought in terms of size limitation (and it is an excellent question that you raised there), but for information, that made years that I function thus, that is to say call with a data base (INNER JOIN obliges... massive DATAS back) and global return of the information in the form of JSON, then in order to avoid the requests inter pages, I store directly JSON in the localstorage (PWA obliges) and that functions marvelously...

 

judicious choice that you made there, 😉

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 20, 2021 Nov 20, 2021
LATEST

Thanks Birnou,

 

Storing the data in local storage is an interesting approach if you need to access it again through out the website.

 

Hopefully the size of the json file returned from my database should be well within acceptable levels. l was just being over cautious as l wouldn't want to compromise on performance.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines