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.
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
See the Salesforce documentation article: Visualforce Performance: Best Practices > Controlling Data Size.