Avoid using data grids

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.

What's here


Related content

Apex Page rules

Salesforce rules




Last modified on Jun 10, 2020