Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 6    Views: 97

RonBo
buzztouch Evangelist
Profile
Posts: 167
Reg: Feb 26, 2012
Raleigh, NC
5,220
01/18/13 12:19 PM (11 years ago)

MAX size of configuration data?

I am using the snippet keeper plugin to bring in quite a bit of menu items into my configuration file, and I seem to be hitting a limit of 64K. When I check the size of my (validated) JSON from the snippet keeper, it works in my app fine. If I add more menu items to push it past 64K, my app say error downloading. All of the JSON passes validation, all I'm doing is adding more rows in. Is there any limit to the size of the configuration file. (I'm NOT self hosted, and this is a 2.0 app)
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
01/18/13 12:43 PM (11 years ago)
I had this problem too. The configuration file is not the issue - it's the JSON Snippet Keeper tool. It can only hold so many lines (1000 maybe?). My solution was to have multiple "screens" of the JSON Snippet Keeper in my app, splitting up the code between them.
 
RonBo
buzztouch Evangelist
Profile
Posts: 167
Reg: Feb 26, 2012
Raleigh, NC
5,220
like
01/18/13 12:52 PM (11 years ago)
How do you splice together these JSON snippet keeper files? In my case, I'm building large menu item lists, so would need to have a way stitch these together. Stobe, do you know of a limit in the snippet keeper itself?
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
01/18/13 01:00 PM (11 years ago)
The actual "engineering" of the plugin was done by David, so he'd be the one to ask. But as far as splicing together some snippets, it would depend on how many menus you have. Is it one BIG menu with a lot of childItems? Or a few menus, with many childItems? If its one big menu, it might be better to put the childItems in a text file, and let the snippet plugin call that in (I could probably show you how). If its several menus, then you can create a separate snippet plugin for each menu, making the overall size (of each) smaller.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
01/18/13 01:01 PM (11 years ago)
First thing I would do is to separate out the screens from the menu. Have one JSON snippet keeper screen just for the menu and its child items, and another 1+ for the JSON of each screen that the menu items point to. If you are still running out of room on the menu screen because you have that many child items, then you may want to use a dataURL and host the menu screen data on dropbox, etc.
 
RonBo
buzztouch Evangelist
Profile
Posts: 167
Reg: Feb 26, 2012
Raleigh, NC
5,220
like
01/18/13 01:22 PM (11 years ago)
Yeah this is a 400 item menu, each with 3 sub-items (dialing business, home and mobile phone numbers). Built this with the List Menu tool in about 5 minutes, and working great with a dataURL. The whole reason I'm trying to bring into the configuration data (via Snippet Keeper) is to make these searchable via the Search plugin, which searches on the navBarTitleText of each item. It's difficult to scroll that many screens to find the person to call.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
01/18/13 01:29 PM (11 years ago)
Another thing to try - remove line breaks. It's not very user friendly, but you can fit more into each snippet.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.