Slow loading data in Table

I have filament user resource, when I want to show all records it's so slow and the app crash.
20 Replies
Brian Kidd
Brian Kidd2y ago
How many user records are in the database?
Mohmd
MohmdOP2y ago
13000 almost
Husniddin
Husniddin2y ago
Bro technically you can't show all in once PHP doesn't allow you to do that You can increase memory using php.ini But It won't fix your problem at all if you want to show all in once Better solution use paginations or lazyloading In extrime cases you can get only special columns
wyChoong
wyChoong2y ago
does it make sense to show 13k of records at once?
Mohmd
MohmdOP2y ago
some times I need to show 1000 records once
wyChoong
wyChoong2y ago
this is not something can be fixed or should be fixed in filament
toeknee
toeknee2y ago
Yeah filament tables is not for you if you want to be showing 1000 records because of how Livewire works you are sending the entire html of the table back and forth. It is not viable at all. You should have the ability to condition and limit to a maximum of 100. I.e. have filters so those 1000 results can be filtered down nicely.
Dan Harrin
Dan Harrin2y ago
your poor users...
wyChoong
wyChoong2y ago
It’s not about livewire 😂 Even with plain php or ajax datatable it’s still gonna be sucks for showing 1000 records at once
Dan Harrin
Dan Harrin2y ago
exactly, its completely unrealistic and a poor UX its like asking a browser to calculate the first billion digits of Pi
Mohmd
MohmdOP2y ago
So why their is "All" option in pagination?
Dan Harrin
Dan Harrin2y ago
because many people do not have 13k records in their table
Mohmd
MohmdOP2y ago
the problem is not with me as developer, the users some times the choose all option and then website crush.
Dan Harrin
Dan Harrin2y ago
you can turn that off
Mohmd
MohmdOP2y ago
I will do, I was curious how to make table load faster for 50 or 100.
Dan Harrin
Dan Harrin2y ago
100 is alot 50 should be under 1s
Mohmd
MohmdOP2y ago
okay so nothing I can do to make it faster.
Dan Harrin
Dan Harrin2y ago
server optimization opcache query optimization how fast is it?
Mohmd
MohmdOP2y ago
great thanks alot 🥲 I will but max 50 per page !
toeknee
toeknee2y ago
This is a good choice

Did you find this page helpful?