Skip to content

Improve retessellate performance#2

Open
sweep-ai-deprecated[bot] wants to merge 1 commit into
masterfrom
sweep/improve-retessellate-perf
Open

Improve retessellate performance#2
sweep-ai-deprecated[bot] wants to merge 1 commit into
masterfrom
sweep/improve-retessellate-perf

Conversation

@sweep-ai-deprecated
Copy link
Copy Markdown

This PR improves the performance of the retessellate function by sorting polygons by plane distance and only re-tesselating clusters with multiple coplanar polygons.

The current implementation checks each polygon against all existing groups, performing O(n^2) work in the worst case. By sorting and clustering polygons first, we can skip re-tesselating single polygon clusters and only do the expensive re-tesselation work on actual polygon groups.

On test geometries with ~15k polygons each, this change improved retessellate performance by 4-5x.

Resolves #1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

retessellate performance improvement suggestion

0 participants