-
-
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
Property getting on Model objects extremely slow comparing with Plain objects. #12953
Comments
Hello, I see this issue was dropped from the milestone, when to expect it? Thank you! |
@wunderb1t we'll add it back to our next milestone and see if we can repro and fix. |
Speed up get on top-level properties by 10x
With #13254, we got a 10x speedup: Before:
After:
We may be able to improve this more in the future by avoiding the |
Prerequisites
Last performant version
6.9.0
Slowed down in version
6.9.0
Node.js version
13.14.0
🦥 Performance issue
Suppose we have 1k documents in MongoDB collection and we fetched them all.
Then we want to work with all document properties inside loop because we have familiar application structure.
The problem is that property getting on Model objects extremely slow comparing with Plain objects.
Here is ours tests output result:
Steps to Reproduce
Expected Behavior
Iteration time should be similar to Plain objects loop time.
The text was updated successfully, but these errors were encountered: