Page MenuHome

Boolean: Parallelization of "find_component_containers" function
AbandonedPublic

Authored by Erik Abrahamsson (erik85) on May 30 2021, 6:50 PM.

Details

Summary

This parallelizes the closest_on_tri_to_point function inside find_component_containers.
It clashes with parts of D11432 but using the best of both is possible.

With my test file the elapsed time went from 17s to 6.1s.

Diff Detail

Repository
rB Blender

Event Timeline

Erik Abrahamsson (erik85) requested review of this revision.May 30 2021, 6:50 PM
Erik Abrahamsson (erik85) created this revision.

Could you upload the test file you used please?

Erik Abrahamsson (erik85) edited the summary of this revision. (Show Details)

This patch was a good idea -- and addressed a big performance problem when there are multiple components, each of which has a large number of faces.
But I found that a better fix was to use a floating point version of the closest_on_tri_to_point function to see if it was at all possible that the new triangle was closer than the old, before doing the mulitprecision version. I commited that with rBdc960a81d1bd . And after that commit, I have another idea -- using bounding box tests to eliminate whole component vs component calculations, which will cut a lot more time off. If there are still cases that would benefit from parallelizing this loop after that, we can consider doing that again in the future, but for now I am abandoning the idea of merging this patch in as is. Thanks again for the patch, though!