I was testing out the page caching feature on an account detail page because the page has gotten very large with lots of child objects. However, when the account model is checked as “process model client side” which is recommended for when page caching is on, for some reason the chatter feed disappears. As soon as I uncheck the box on that model, and leave page caching on, the chatter feed shows up.
Any idea why? Also what are some other ways to speed up the page load time? Using page includes for the child objects?
Here is what is happening:
1. “Process model client side” means that the model metadata and data will be loaded after the page loads. Nothing at all there when page loads.
2. The chatter feed is loading on page load. ANd not finding an ID from your model to bind to. So its blank. boo.
Options:
You could include Chatter in a page include. Lazy load the include and put it in a tab that the user won’t be seeing on page load. That way the page will have time to load, and process the model data aqusition client side before Chatter is even invoked.
A side note: If you’ve got any javascript that runs on page load, and uses data or metadata from the model in question - you will have similar issues.
Performance optimization is done in the ways you are attempting. Either use client side models, or page includes, or tab show actions to limit the amount of both data and metadata being retrieved from models at page load. Then load the data after showing the base page - or after a user takes some action.
Got it. Thanks for the detailed response!
Rob one more question. In order to speed up the page, is there any disadvantage to not loading the child object models on page load, and then querying those models when their tab is shown the first time? This would be instead of using page includes.
I’ve not tested this, but conceptually the two different patterns should be similarly performant. The page include method will lessen the payload of what is sent down on initial page load (cuz its just a reference and doesn’t have all the page definition) and that might make it marginally faster. But there are very significant advantages to keeping everything on one page…
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.