Hi Glenn,
1. For now I think your method is a good way to get more heap.
2. Do you know if you just pull up the included page separately if it takes about the same time to load?
For the future, we’re thinking through adding an API method to models called “getMoreData()” or something like that. Basically, it would use SOQL’s OFFSET and LIMIT functionality to get the next set of data for the model. This could be repeated as many times as you would like to get as much data from salesforce as you would like. It may take a few round trips to get all your data, but once you had it in your browser you could do whatever you wanted with it. We’re thinking you could just specify a “chunk size” and and maybe “max round trips” and Skuid would handle the rest to fill up your model.
Does that sound like something you guys could use?
Update for this post. A while back we added an API method to skuid models called loadNextOffsetPage(). Documentation on this function is here… http://help.skuidify.com/m/11720/l/205447-skuid-model-model
If anybody wants an awesome little function to load data by offset:
function load(model){ <br> model.loadNextOffsetPage(function(){<br> load(model);<br> });<br>}<br>load(skuid.model.getModel('MyModel'));
Just put this in a pageload function, and enjoy.
Thanks for sharing Moshe! Happy Friday.
I am trying to query a model multiple times by setting different conditions in snippet in a for loop and tried to get data batch wise. But get more data is not working as expected. Any thought?
Disclaimer- you may have more chunky data than I do. But one way I have avoided page heap size is by breaking the page itself into multiple page includes. IE I may have a couple objects on the beefy page but then I separated the Charts into their own page include and just fed the parameters into the page include. When I did this I could include multiple page include charts in the same page without issue. (reminder-object names within the page include have to be unique so there isn’t conflicts). But it allowed me to bring all my data into one page without an issue. You have to keep the page include below the HEAP limit. So in your case maybe one chart per include in some cases. But collectively I haven’t seen an impact on the main page as long as the page include didn’t bust the limits. I am not an expert coder like many of you, but that was my experience.
As well use a lot of page includes for those situations, but another thing that can maybe help, is the models you query at page load
So example instead of querying let’s say 10 models at page load, I query let’s say 2-3 and in those i create an model action, when requeried to query the other model(s). But this slows down a bit loading time
As well if you using tabs on that page, the model in tabs you don’t need right away can be queried only at the moment you go on that tab and not on page load
Or if you have TFG component installed, I use this often i put a collapsible wrapper on my page, I hide wrapper header, and in actions i query model(s) on ‘Before first open’
There’s many other little tricks like this if you need, let me know
Hope it helps