-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
3D plotting performance improvements #29397
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
3D plotting performance improvements #29397
Conversation
4527293
to
2f2e65c
Compare
Thoughts on if the 3D speedups warrant a what's new? |
Since these are substantial, I‘d say yes. |
d51b947
to
1516928
Compare
# Some faces might contain masked vertices, so we want to ignore any | ||
# errors that those might cause |
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.
Should these errors be handled within the _proj_transform_vectors
case directly closer to where these errors would actually arise? I know there has been some work in numpy to not raise invalid/division warnings on masked elements, so is this still an issue now?
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.
I removed the error ignore line and did not see any issues. The tests cover partially masked Poly3DCollections, so that case is exercised, and it looks like the improved masked handling covers any previous errors here.
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 like the error does crop up in the AppVeyor build, so adding the original error suppression back in. I don't want to put it in _proj_transform_vectors
since it might not always be the case that we know that we have masked out the problematic vertices outside of that function.
927e500
to
645dfc8
Compare
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.
I think this is a really great performance improvement and shows how much of an impact numpy vectorization can have. Just a few minor nits that you can take or leave.
f6356c0
to
14e26f9
Compare
14e26f9
to
68b8a6c
Compare
PR summary
This builds off of #16688, to rebase off of main, extend as applicable to all the 3D object types, and allow for compatibility with the new 3D axlim clipping. With the test code below, I am seeing substantial speedups in draw times for some types of plots.
Closes #16659
PR checklist