MITK has migrated from Bugzilla to Phabricator. Please head to our new bug tracking system.
Bug 17339 - The usage of the itkNewMacro may lead to performance bottlenecks
The usage of the itkNewMacro may lead to performance bottlenecks
Product: MITK
Classification: Unclassified
Component: Core
All All
: low feature request
: 2014-03
Assigned To: Sascha Zelzer
Depends on:
  Show dependency treegraph
Reported: 2014-02-26 00:50 CET by Sascha Zelzer
Modified: 2014-03-03 12:57 CET (History)
1 user (show)

CAPA Problembeschreibung:
CAPA Bewertung:
CAPA Ursachenanalyse:
CAPA Lösungsansatz:
CAPA Ergebnis Problembehebung:
CAPA Prüfung:
Likelihood: ---
m.nolden: Needs_Core_Modification+


Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Zelzer 2014-02-26 00:50:06 CET
In almost all MITK classes which derive from itk::LightObject, the ITK itkNewMacro is used to generate a static New() method. This method asks all registered ITK object factories if they can create an object of the given type.

Many calls to such New() methods with a high number of registered object factories result in many cpu cycles spent asking object factories. Because the object factory mechanism is not used at all in MITK (at least for injecting customized types into the object creation system), this overhead is not justified and the alternate itkFactorylessNewMacro macro should be used instead.
Comment 1 Git Admin 2014-02-26 01:07:00 CET
User zelzer has pushed new remote branch: 

Comment 2 Sascha Zelzer 2014-02-26 16:48:36 CET
[51a9ba]: Merge branch 'bug-17339-factoryless-new'
Merged commits:
2014-02-26 01:06:12 Sascha Zelzer [277cb9]
Fixed static initialization order problem.

2014-02-26 00:33:51 Sascha Zelzer [702821]
Replaced all itkNewMacro occurrences with itkFactorylessNewMacro.