Lazy Loading Visualforce page

To reduce or delay expensive calculations or data loading, use lazy loading, a technique in which a page loads its essential features first and delays the rest—either briefly or until the user performs an action that requires the information. This technique gives users faster access to essential features, improving the apparent responsiveness of a large page, even though the entire page takes the same total time to load.

To lazy load parts of a Visualforce page:
1. Use the rerender attribute on Visualforce components to update the component without updating the entire page.

2. Use JavaScript Remoting to call functions in your controller through JavaScript, and to retrieve ancillary or static data.

3. Create a custom component to show and hide data according to user actions.

When lazy loading pages, consider the number of users and amount of data you expect to use the page, and watch out for limits like the concurrent API call limit. For example, if a navigation tree only loads elements as needed, the number of queries might end up out of proportion to the data.


No comments:

Post a Comment

Sharing is Caring!!! Share this with your friends!!!

submit to reddit