1

I'm using Yii2 GridView to display data from ActiveDataProvider, the speed of it is working nicely when its pagination-enabled. But when displaying all the rows, everything lags.

I'm using a normal Controller->View flow.

Added Database Caching also Normal Controller

TechMafioso
  • 135
  • 4
  • 16

1 Answers1

1

Without pagination al the rows are fetched by the ActiveDataProvider and rendered dy gridview ..

Regardless of performance. This is unhelpful in terms of an acceptable user experience.

If your need is to have client side of the totality of data, it is advisable to avoid the use of the ActiveDataProvider and the gridview, and alternatively use a sql command creat with with createCommand(....); and sql and restrain the result as a JSON structure to process client / side

ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
  • My issue is that sometimes if the user wants to load all the rows (for some reason), I have some Jquery UI that lags for example resizing the gridview itself. – TechMafioso Aug 12 '17 at 13:10
  • 1
    the answer is clear .. without pagination all the rows are fecthed and renderd .. if you want more speed .. you can do as suggested .. there are not other ways .. – ScaisEdge Aug 12 '17 at 14:36