Any plans to implement LazyCollection? #638
jiaoliness
started this conversation in
Ideas
Replies: 1 comment
-
Hi, we know that in the database it will only bring up using pagination, and that shouldn't be slow if you specify a very high Since this table has a lot of records, I recommend using "min" mode in Footer::showRecordCount. This will eliminate the total table count. Footer::make()
->showPerPage()
->showRecordCount('min'), Make sure you don't use Collection in the datasource method; public function datasource(): Builder
// ... You can also specify which columns the Builder should query. public function datasource(): Builder
{
return User::query()->select('id', 'name');
} Make sure you are using 'Eager Loaging' when retrieving data from a relationship. public function datasource(): Builder
{
return Dish::with(['category:id,name', 'kitchen']);
} Tell us if it worked. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Loading a very large dataset into the table takes quite a bit of time. The SQL query itself is very fast, but loading all the individual results into memory when each result is transformed into a Collection object takes time, for me around 10 seconds for pageload for 200k entries.
Beta Was this translation helpful? Give feedback.
All reactions