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
Improve pickling/unpickling performance #59
Conversation
I found while using the library that it was generating a bunch of intermediate objects that could be avoided, and that these were contributing non-trivially to execution time. I addressed many of them while also avoiding touching the public surface area, as I wasn't sure if it was maleable or not.
@stephentoub - Do you think it would be valuable to add your benchmark test to the repo? |
That would be up to @irmen. There's currently no perf tests project, and the only perf test anywhere for the C# functionality is minimal and disabled ( Pyrolite/dotnet/Razorvine.Pyrolite/Tests/Pickle/UnpicklerTests.cs Lines 515 to 516 in 87de771
|
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.
Looks great. Thanks for this improvement!
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.
Thanks a lot for this PR! Really appreciate the contribution! I have added a few questions in this review though
@stephentoub may I ask in general, what you are using Pyrolite for? |
Yup. Been looking at using it as part of https://issues.apache.org/jira/browse/SPARK-27006. |
@irmen, please let me know if there's anything else you'd like me to address. I'm happy to make whatever changes would help to get this in and into an updated NuGet. |
Thanks, @irmen. |
just published the new version to nuget.org as well. |
Awesome. Thanks! |
thanks for the improvements and interest in pyrolite, really appreciated |
Thanks for the helpful library!
I found while using it that it was generating a bunch of intermediate objects that could be avoided, and that these were contributing non-trivially to execution time. This PR addresses many of them while also avoiding touching changing the public surface area, as I wasn't sure if it was malleable or not. There's more that can be done in this regard, but for now this addresses a lot of the low-hanging fruit that's there.
(I also disabled one test that was failing prior to any of my changes.)
Example:
Before:
After:
cc: @imback82, @eerhardt, @rapoth