Plat-Dev-301 practice question 10 of 10
A Visualforce page loads slowly due to the large amount of data it displays. Which strategy can a developer use to improve the performance?
Full set: 160 questionsA slow initial page load due to a large dataset is best solved by reducing the amount of data queried and transmitted at once. Lazy loading is a design pattern that defers the loading of data until it is needed. Instead of querying all records in the controller's constructor, an initial, smaller subset is loaded. More data is then fetched on-demand via user actions like clicking a "Next" button or scrolling, significantly improving the initial perceived performance of the page. This is often implemented using a StandardSetController or custom Apex with offset.
A. The transient keyword reduces view state size, which improves performance on subsequent requests (postbacks), but does not affect the initial query and page load time.
C. Moving data processing to the browser doesn't solve the core issue, which is the time taken to query and transfer a large dataset from the server initially.
D. An is used for periodic, automatic refreshes of data from the server. It is not an appropriate mechanism for an initial bulk data load.
Salesforce Visualforce Developer Guide, "Best Practices for Improving Visualforce Performance", Section: "Working with Large Data Volumes". This section recommends using pagination with a StandardSetController or custom controllers to lazy load data.
Salesforce Architects, "Designing Record-Centric Applications on Salesforce", Section: "Data Handling Patterns". This guide discusses patterns like lazy loading for handling large data volumes efficiently.
Keep practicing
Take the free Plat-Dev-301 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other Plat-Dev-301 practice questions
- Question 1Which use case can be performed only by using asynchronous Apex?
- Question 2The Account object has a field, Audit_Code__c, that is used to specify what type of audit…
- Question 3How should a developer verify that a specific Account record is being tested in a test cl…
- Question 4There is an Apex controller and a Visualforce page in an org that displays records with a…
- Question 5A developer created and tested a Visualforce page in their developer sandbox, but now rec…
- Question 6Refer to the code below: Lightning Web Component JS file JavaScript import {LightningElem…
