[Insight-users] Performance issues in itk::LightObject::Register and itk::LightObject::Unregister (patch included)

Tom Vercauteren tom.vercauteren at m4x.org
Fri Apr 4 12:57:30 EDT 2008


Hi all,

After some profiling on my application, I realized that ITK was
spending some 15% of the time in the itk::LightObject::Register() and
itk::LightObject::Unregister() functions. This was originating from
the mutex lock used when incrementing and decrementing the reference
counts.

Similarly to other open-source libraries (Boost, QT, etc.) these locks
can be avoided by using atomic operations.

I have filed a bug on the bug tracker, it includes a patch that should
work on windows, mac and any system using gcc (I only tested on
linux):
http://www.itk.org/Bug/view.php?id=6719

It is related to a similar performance issue on time stamps:
http://www.itk.org/Bug/view.php?id=6599

It would be great if these patches could be integrated before the
release of ITK 3.6.

Best regards,
Tom Vercauteren


More information about the Insight-users mailing list