My skuid page is really big

  • 2
  • Problem
  • Updated 8 months ago
  • Acknowledged
I think I may have hit the limit in XML characters that skuid is capable of storing in SF.

I say this because i had to delete some txt from the xml just now in order to add the closing > to the xml
Photo of Brandon Gage

Brandon Gage

  • 376 Points 250 badge 2x thumb

Posted 5 years ago

  • 2
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,128 Points 50k badge 2x thumb
Hi Brandon,

To test whether you have in fact exceeded the XML size limit, here's a line of JavaScript you can run from the JavaScript Console in the Page XML Editor that will tell you either "Limit Exceeded" or "Under the limit":

(skuid.$M('page').getFieldValues(skuid.$M('page').data[0],skuid.builder.core.layoutFields,true).join('').length>=(32768*5))?'Limit Exceeded':'Under the limit';





Photo of Brandon Gage

Brandon Gage

  • 376 Points 250 badge 2x thumb
Zach, I ran the script it did not return that it had to many characters, however I just changed a label and saved the skuid page and it did the same thing, it is cutting off the last > on the skuid closing statement, could it be a number of lines? I am at 2054
Photo of Evan McDaniel

Evan McDaniel

  • 216 Points 100 badge 2x thumb
Note that as of 2018, there's a small change that needs to happen in that script to get it to work (the script as is throws a 'Uncaught TypeError: Cannot read property 'map' of undefined' error).

(skuid.$M('page').getFieldValues(skuid.$M('page').data[0],skuid.builder.core.getLayoutFields(),true).join('').length>=(32768*5))?'Limit Exceeded':'Under the limit';
Photo of Jack Sanford

Jack Sanford, Champion

  • 9,714 Points 5k badge 2x thumb
Has this limit changed recently? We are getting Limit Exceeded with the above script, and are nearly 5x over 32768*5 at 560000+, however it's not cutting off the XML, it's just running really really slow. We're going to break it up into page includes, because there's a significant delay in doing normal tasks in the page builder, but other than slowness the page continues to function (whereas in the past I've had that issue of XML cutting off). 
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,550 Points 10k badge 2x thumb
Your page is too big. :) A while back, (I'm not sure when) Salesforce increased the length of long text areas from 32768 to 131072. So you should be able to go up to 131072*5. I wouldn't recommend it though.
Photo of Jack Sanford

Jack Sanford, Champion

  • 9,714 Points 5k badge 2x thumb
But there's still 861,000 characters available on the Page object! haha yeah... getting up above 560,000 makes development really tedious. Click, wait.... 

Thanks for the explanation :)