Discussion Forums  >  Self Hosted Control Panels

Replies: 5    Views: 60

nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
10/25/13 02:09 AM (12 years ago)

Snippet Keeper input size fix

The following pdf explains how to fix the text size limit on the JSON Snippet Keeper plugin. This fix is for self hosted Buzztouch accounts. https://dl.dropboxusercontent.com/u/2452503/snippetKeeperFix.pdf A big thanks to David Book for taking the time to work through this with me.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/25/13 03:10 AM (12 years ago)
Nice work, Nad :) Cheers! -- Smug
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
10/25/13 07:02 AM (12 years ago)
Very cool. I'm sure David warned you about the time some devices may take to parse a ton of JSON, right? I would make sure you test often on physical devices (not just the simulator) to make sure it doesn't bog things down too much. -Chris
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
10/25/13 08:38 AM (12 years ago)
One way to heed the warning from Chris is to use the Data URL method. One can partition the JSON across screens by splitting it up into multiple files. Of course, it would be nice to have an option on the Control Panel to save that screen's JSON as it's own file. What are the gotchas to be aware of if one was to develop such a capability? -- Niraj
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
10/25/13 09:34 AM (12 years ago)
Its not necessarily the amount of JSON, its "when" it get's parsed that is the key. David has described "lazy loading" in our previous conversations, where only the JSON that's immediately necessary gets parsed. That, of course would take some re-engineering down the road. If you're using a dataURL for a remotely hosted file, then you have to compound the time needed to download along with the time needed to parse. I've used a file (compiled in the app) with tons of JSON before, and I still had to shrink it down to a point that was comfortable on older devices.
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
10/25/13 03:24 PM (12 years ago)
We mainly discussed the impact on the database. Each bt_item gets filled with the users text then gets filled with some null characters up to the 16mb limit. This fix doesn't just affect the JSON snippet keeper plugin but all bt_items across all apps and pluggins on the self hosted server. So if you have a lot of apps or your apps have a lot of bt_items there is a chance for some slow down on the server. I haven't had a chance to test the load times on a device yet. I will though. My quiz bank is roughly 2400 questions.
 

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.