F
Filament16mo ago
Mohmd

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 Kidd16mo ago
How many user records are in the database?
Mohmd
MohmdOP16mo ago
13000 almost
Husniddin
Husniddin16mo 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
wyChoong16mo ago
does it make sense to show 13k of records at once?
Mohmd
MohmdOP16mo ago
some times I need to show 1000 records once
wyChoong
wyChoong16mo ago
this is not something can be fixed or should be fixed in filament
toeknee
toeknee16mo 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 Harrin16mo ago
your poor users...
wyChoong
wyChoong16mo 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 Harrin16mo ago
exactly, its completely unrealistic and a poor UX its like asking a browser to calculate the first billion digits of Pi
Mohmd
MohmdOP16mo ago
So why their is "All" option in pagination?
Dan Harrin
Dan Harrin16mo ago
because many people do not have 13k records in their table
Mohmd
MohmdOP16mo ago
the problem is not with me as developer, the users some times the choose all option and then website crush.
Dan Harrin
Dan Harrin16mo ago
you can turn that off
Mohmd
MohmdOP16mo ago
I will do, I was curious how to make table load faster for 50 or 100.
Dan Harrin
Dan Harrin16mo ago
100 is alot 50 should be under 1s
Mohmd
MohmdOP16mo ago
okay so nothing I can do to make it faster.
Dan Harrin
Dan Harrin16mo ago
server optimization opcache query optimization how fast is it?
Mohmd
MohmdOP16mo ago
great thanks alot 🥲 I will but max 50 per page !
toeknee
toeknee16mo ago
This is a good choice
Want results from more Discord servers?
Add your server