-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Don't do draw_marker optimization for large paths #3826
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
Don't do draw_marker optimization for large paths #3826
Conversation
def test_large_single_path_collection(): | ||
buff = io.BytesIO() | ||
|
||
# Generates a too-large single path in a path collection that |
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.
How about doing this with PathCollection([really_long_path])
? Personally I think including stackplot in the equation muddies the test (e.g. what if we changed some detail about stackplot in the future).
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.
That's a good idea. Will update.
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.
Updated.
My only question is whether the original optimization is improving real-world performance enough to justify the considerable complexity it introduces. |
I haven't looked to see exactly which optimization this is, but IIRC, it On Fri, Nov 21, 2014 at 12:38 PM, Eric Firing notifications@github.com
|
I think this was originally implemented at the request of @ChrisBeaumont of the Glue project. It uses scatter extensively, and was unusably slow without this optimization. |
OK, that is awakening some traces in my memory. It makes sense. While you are in the code, @mdboom, would you consider adding a comment, please? Something like "Optimization: use fast marker rendering when possible. This is needed for some uses of scatter, for example." |
👍 LGTM |
Don't do draw_marker optimization for large paths
Really large paths need to be clipped or they will crash the rasterizer.
Fixes #3626, and this is a narrower fix than #3761.