Avoid Using Data Grids

< 1 min read

Impact Area

Performance

Severity

Medium

Affected Element

Apex Page

Rule ID #

SF-0117

Impact #

Data grids display many records with editable fields. Data grids frequently expand to thousands of input components on a page and exceed the maximum view state size, resulting in a Visualforce component tree that’s slow to process.

Remediation #

If your Visualforce page needs a data grid:

  • Use pagination and filters.
  • Where possible, make data read-only to reduce the view state size.
  • Only display essential data for a given record, and provide a link for an Ajax-based details box or separate page to view the rest

Time to fix #

60 min

References #

See the Salesforce documentation article: Visualforce Performance: Best Practices > Controlling Data Size.

Updated on March 21, 2025
Was it helpful ?