Skip to content
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

Optimize geometry conversion code #1

Open
TeodorVecerdi opened this issue Sep 8, 2021 · 0 comments
Open

Optimize geometry conversion code #1

TeodorVecerdi opened this issue Sep 8, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@TeodorVecerdi
Copy link
Owner

I tried to optimize the code at the expense of some readability, but it's still quite slow.
It might be worth looking into https://docs.unity3d.com/Manual/JobSystem.html and refactoring code to work with that. The biggest performance hit comes from a big nested loop that should be easy to parallelize.

Performance breakdown:

  • GetDuplicateEdges: 66.2%
    • Self: 32%
    • List.get_Item: 15.8% (8,297,838 calls)
    • VectorUtilities.DistanceSqr - 12.8% (5,528,820 calls)
    • List.get_Count: 2.6% (1,385,660 calls)
  • RemapDuplicates: 18.6%
  • RemoveDuplicates: 3.3%
  • RemoveInvalidDuplicates: 0.7%
  • GetDuplicateVerticesMap: 0.3%
@TeodorVecerdi TeodorVecerdi added the enhancement New feature or request label Sep 8, 2021
@TeodorVecerdi TeodorVecerdi self-assigned this Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant