-
Notifications
You must be signed in to change notification settings - Fork 347
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
Slowdown in buffer of a MultiPolygon in GEOS 3.8 #293
Comments
|
Some measurements with the packages I have lying around, using the python script from shapely/shapely#834 (comment): Everything was built from master in different dates:
So it seems master got at least two changes to improve times, one between 9e46b93 and 7ed0c82, and one (the most impactful) between 7ed0c82 and 7f2d969. I hope this helps, if necessary I could try to create more intermediate packages to bisect the improvements. |
|
Many thanks @Algunenano for the testing. I'm not surprised that 1bf16cd provides a performance improvement, but I don't see any explanation for a huge performance regression from 3.7.x to 3.8.x, which is what I think you're reporting, @jorisvandenbossche . I'm not sure it's wise to backport 1bf16cd to a stable branch. |
|
Yes, I just wanted to ask the same, whether 1bf16cd is a backportable commit. I certainly understand if that is not the case. I can try to investigate later a bit more to see where the performance regression came from. |
|
Some more tests:
Now going from more recent to older in the 3.8 branch:
I'll try to bisect between 6ca3f4c and 02ddad9 (~20 commits). |
So there is 2 options: There have been multiple changes in 3.8 after that so I can't simply revert those on the 3.8 branch, but I'm fairly certain that 893b84b is the cause of the slowdown. |
|
My money is on the first one 893b84b, changes in polygon builder seem like they'd probably affect buffering |
|
Agreed. I suspect cherry-picking 8b0f0cd into 3.8 (definitely safe) may resolve this. |
|
I'll settle for much improved for now. |
|
Applied to 3.8 as 6b12bcc |
|
I can confirm that 3.8/HEAD + 8b0f0cd gives almost the same speed as master (around 70ms for my pygeos example, vs around 3s for 3.8.0) Thanks all! |
|
Thanks for your persistence 😄 |
Original report from Shapely at shapely/shapely#834 (but further discussed in shapely/shapely#847 (comment) and conda-forge/geos-feedstock#43).
A reproducer using python and pygeos (reproducer with shapely is at shapely/shapely#834 (comment)):
The above gives a timing of around 60 ms with GEOS master or with 3.7, but around 3 seconds with GEOS 3.8.0.
So it seems this is already fixed on master, and so this might be a potential candidate to backport to 3.8? (I checked that the latest 3.8 branch (to become 3.8.1 I assume) does not yet include the fix, as it gives a similar timing as 3.8.0)
I didn't yet try to look for the commit that fixes this.
The text was updated successfully, but these errors were encountered: