You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a model that has a belongsToMany relation and has 200 related models in that relation that is VERY slow to load. Takes several seconds to load when the SQL queries themselves are taking only ms to run.
I ran the xdebug profiler on it and it looks like DataLinksHelper::relationshipsLinksSelf is very very slow. When I comment this line:
the whole request takes less than a second with no changes to the relations, etc. Was unsure if I should post this issue on this repo or here: https://github.com/nilportugues/php-json-api/.
Anyway, not sure if there's anything that can be done to speed it up, but I thought I'd check. Here's a screenshot of the xdebug profile. Each call to the function takes 431ms and it's called for every one of the related models.
The text was updated successfully, but these errors were encountered:
I have a model that has a belongsToMany relation and has 200 related models in that relation that is VERY slow to load. Takes several seconds to load when the SQL queries themselves are taking only ms to run.
I ran the xdebug profiler on it and it looks like
DataLinksHelper::relationshipsLinksSelf
is very very slow. When I comment this line:https://github.com/nilportugues/php-json-api/blob/master/src/Helpers/DataLinksHelper.php#L170
the whole request takes less than a second with no changes to the relations, etc. Was unsure if I should post this issue on this repo or here: https://github.com/nilportugues/php-json-api/.
Anyway, not sure if there's anything that can be done to speed it up, but I thought I'd check. Here's a screenshot of the xdebug profile. Each call to the function takes 431ms and it's called for every one of the related models.
The text was updated successfully, but these errors were encountered: