-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Optimize nested populate #3812
Comments
any idea when this might get done? really hoping for this performance gain. |
Not really a priority atm but PRs are welcome. |
We did a bunch of refactoring to support this in the 5.7 branch, but it's proven to be quite tricky. The amount of refactoring we did is about as much as I'm comfortable doing for a minor release, especially since |
In the following
PostSchema
we have nested structure that has_author
field in post itself and comments:When we fetch post and populate
_author
fields mongoose makes two queries:It would be great performance increment if mongoose will make only one query to populate
_author
field:The text was updated successfully, but these errors were encountered: