Filtering data taking too long with huge records

Hello guys, I'm new to filament and I'm experiencing a huge delay when filtering the data, I looked online but couldn't find anything helps, and I don't know why this issue happening, please note that It's already being deployed to the server and the server memory limit is 512 using PHP version 8.2. I hope the video explain the struggle
6 Replies
0kyouma1
0kyouma1OP4d ago
up
Illizian
Illizian4d ago
Have you tried taking a look at the db queries it's making. You can install debugbar to have a look. Maybe lazy loading? If not, a missing index perhaps
toeknee
toeknee4d ago
What are you testing that on? Live or local? If local is it a mac or windows? Windows will tend to be slow, test in production and ensure icons are cached too and see again. Failing that, ensure your select options are closures and also install telescope and debug each request to why it's slow.
0kyouma1
0kyouma1OP4d ago
The project already deployed on Linux server and I'm accessing it, how even when I test it on local it tends to be pretty fast compared to the server even with debugger active.
nanopanda
nanopanda4d ago
I would recommend logging the queries that your filters are triggering locally and running them directly against the production DB. Approximately how many records is "huge"? If your production DB is on the same server as your app then it likely does not have enough memory. A large MySQL / MariaDB can eat up 2GB easily.
toeknee
toeknee3d ago
You would need to test your stack in that scenario. I would recommend adding sentyr in that case to find slow downs. it could be a badly optimised server

Did you find this page helpful?