Performance issues as number of vertices increases for intersection operations #1044
olly-writes-code
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @AngusJohnson! Thanks for the wonderful library.
I've been hacking away on some python bindings at pyclipper2.
All the time I'm comparing vs shapely which is my go-to for geometric operations. I came across Clipper while reading the FreeCAD forums so I wanted to give it a go.
I did some benchmarking. For small geometries I see that Clipper2 is roughly 5x faster than shapely but as the number of vertices for the intersecting geomtries (or paths) increases the performance drops off. Here's a chart with some increasing complicated shapes (50 -> 1000 vertices) interesecting a circle.
It seems strange to me that performance degrades so substantially around the 250 vertices mark. Any initial thoughts? Anything I can do to help uncover what might be going on here?
Thanks again!
Beta Was this translation helpful? Give feedback.
All reactions