vtkTransform::Concatenate() is very slow

vtkTransform::Concatenate() gets very slow after calling it multiple times.

The situation is the following:

  • I call vtkTransform::Concatenate( anotherTransform ) to concatenate another vtkTransform (basically applying a rotation matrix if the user clicks on a button)

  • After every click the Concatenate() function take longer and longer and about after 10 clicks the call takes about 1000ms

  • Now I found out that if I extract the vtkMatrix4x4 from the anotherTransform (the transform I concatenate) and set it to a newly created vtkTransform the speed of Concatenate() is very fast each time

Anyone has an idea what the reason for this behaviour is? Am I using the vtkTransform the wrong way or did I forget to set some flag?

I used Instruments on macOS and figured out that vtkTransform::CircuitCheck() uses a lot of computation time, but I can’t figure out why.