Skip to content

Added a note about N+1 problem and form collections #11019

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

Closed
wants to merge 2 commits into from

Conversation

javiereguiluz
Copy link
Member

Fixes #3374 and #4323.

@wouterj
Copy link
Member

wouterj commented Feb 28, 2019

Please note that while joining seems like a performance optimalization, it makes hydration of doctrine way more complex for *..n relations. This often reduces performance instead of optimizing it: https://tideways.com/profiler/blog/5-doctrine-orm-performance-traps-you-should-avoid

@javiereguiluz
Copy link
Member Author

@wouterj I read the article you linked, but decided to merge this anyways. You can see that even the article contradicts itself because in (2) they recommend to not use joins ... but in (5) they recommend to use joins.

This is a tricky issue ... but at least we now display a warning message about this so people can investigate on their own. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants