-
Notifications
You must be signed in to change notification settings - Fork 361
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
Avoid redundant deep cloning when unwinding. #286
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the code quite more unreadable and I'm not convinced about how much of a difference it makes from the performance point of view.
It makes a huge difference if you're working on large objects. It improves performance by 80% on the data I'm currently working on:
|
I agree the readability isn't great though. I can try to clean it up a bit. |
I think this is the best I can do right now :) |
Thanks for submitting and working with us on getting it mergeable 👍 |
Published in v4.1.0 |
AFAICT there's no reason to deep clone unless the unwind path has multiple levels. For large and deeply nested objects this should be a significant performance gain.