How would I choose between `vtkCleanPolyData` and `vtkStaticCleanPolyData`?

How would I choose between vtkCleanPolyData and vtkStaticCleanPolyData? These seem to do the same thing, and the documentation for them is very similar.

The key difference is in the warning section of the docs for the static one.

Static versions of filters are, for the most part, simply threaded versions of the non static filters. This is useful if you aren’t making use of all of your threads and you want to use a threaded filter that will run faster with similar (often identical) results. You would use the non static one if you are limited to a single thread, are already running a multi threaded program and that wouldn’t benefit from the static version or would in fact be hindered by the static filter creating tons of threads in each thread of your program. However, the static filters only exist for filters where the underlying algorithm is easily parallelisable in the general case.

1 Like