-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filters query take a long time #99
Comments
after debug, i found this problem laravel-rest-api/src/Rules/SearchRules.php Lines 99 to 143 in 3e7667e
this is a lot of data with size 92MB |
Hello @ThanhSonITNIC, Thanks for your contribution, if I understand well, in your case the problem is that the fields in the rules are taking a lot of memory ? How much resources do you have in your project ? |
I have 24 resources, each resource only 2 to 5 relations, and around 10 fields each resource laravel-rest-api/src/Rules/SearchRules.php Line 114 in 3e7667e
in some resources it throw error memory size exhausted this pull request #100 can limit useable fields |
@ThanhSonITNIC I can confirm on my side on a large project i went from 3.5 sec to 300ms on a search |
Laravel Rest Api Version
2.4
Laravel Version
10
PHP Version
8.1
Database Driver & Version
mysql
Description
Filters query take a long time in both local and server
Steps To Reproduce
[POST] /api/products/search
[POST] /api/products/search
The text was updated successfully, but these errors were encountered: