-
-
Notifications
You must be signed in to change notification settings - Fork 898
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
feat(doctrine): optimize EagerLoadingExtension to skip unnecessary joins #7039
base: main
Are you sure you want to change the base?
Conversation
Added optimization
interetsing, there's only one failure at features/doctrine/eager_loading.feature:64 I guess it's because of the property filter (it adds |
Ok, looks like I made it green. Now to make tests proving it generates fewer joins. Should I proceed? Any tips? |
really nice, the easiest is to add a feature inside: https://github.com/api-platform/core/blob/main/features/doctrine/eager_loading.feature Fixtures are located at https://github.com/api-platform/core/tree/main/tests/Fixtures/TestBundle/Entity Thanks! |
Just for an update on this - we encountered heavy db problems in our app for some custom filters execution so I'm checking if this is just a problem on our side or this change would do that for everyone, which of course we really don't want to happen. |
first guess: FilterEagerLoadingExtension did you analyse the queries? do you need many joins? |
Probably, yes, this one. We have changed prio of EagerLoadingExtension to -19 and FilterEagerLoadingExtension to -18. Generated query had two nested SELECTs so terrible in general. Analyzing. |
yes its also why we recommend to define your own queries as we're quite limited in how to we can generate automatic queries, you can also use the LinksHandler for these kind of use cases. |
This is a quick check if anything breaks after this optimization. Tests TBD