Performance18% of the exam

UI performance: view state, LDS and lazy loading

How to diagnose and fix slow Visualforce pages (view state, repeated getters, read-only mode, pagination) and slow Lightning web components (Lightning Data Service caching, fewer fields, lazy creation, listener cleanup, infinite loading and production settings).

Official exam objective
Identify the common performance issues for user interfaces and demonstrate knowledge of techniques and tools to mitigate them.

~7 min read · 11 practice questions ·

What the exam expects

  • Shrink a Visualforce view state with transient, read-only components, narrower queries and pagination, and stop getters from re-querying.
  • Use readOnly="true" and StandardSetController when a Visualforce page must show large collections.
  • Cut Lightning web component server trips with Lightning Data Service, and request fields instead of layouts.
  • Defer rarely used components with tabs and lwc:if, remove global listeners in disconnectedCallback(), and page large tables with infinite loading.
  • Recommend production settings for debug mode and secure browser caching.

Key terms: view state (the encrypted hidden field that carries component, field and controller state between Visualforce requests), transient (an instance variable kept out of the view state), Lightning Data Service (the managed client cache of records shared by components), lazy instantiation (creating a component only when the user needs it), debug mode (unminified framework JavaScript for development).

Key facts

View state limit
Detail
170 KB
readOnly="true" iteration limit
Detail
1,000 raised to 10,000 items
readOnly="true" query rows
Detail
50,000 raised to 1,000,000; no DML
StandardSetController maximum
Detail
10,000 records; a larger query locator throws LimitException
Static variables
Detail
Never transmitted in the view state
lightning-record-form
Detail
Specify fields, not a layout, for performance
Datatable infinite loading
Detail
enable-infinite-loading plus onloadmore
Sources for this section (7)
  • Why does `transient` fix a view state error caused by a list that a getter rebuilds every request?
  • When is `readOnly="true"` the right fix for a Visualforce collection error?
  • Why should a `lightning-record-form` list fields instead of `layout-type="Full"`?
  • Which two production settings restore Lightning page speed after a misconfiguration?

The questions are free to read. Answers with their sources and self-grading are included with the pack.

Keep reading with the Platform Developer II pack

  • Core concepts
  • Exam traps
  • Worked scenario

The pack includes:

  • All 28 lessons of the Platform Developer II guide, with reading progress
  • Interactive decision walks and step-by-step sequence steppers
  • Inline practice questions and one-click topic practice (11 questions for this lesson)
  • An official source cited for every claim
  • An AI tutor that answers from the guide
  • Unlimited timed practice exams

Practice for the Platform Developer II exam