MITK has migrated from Bugzilla to Phabricator. Please head to our new bug tracking system.

Bug 17339

Summary: The usage of the itkNewMacro may lead to performance bottlenecks
Product: MITK Reporter: Sascha Zelzer <sascha.zelzer>
Component: CoreAssignee: Sascha Zelzer <sascha.zelzer>
Status: RESOLVED FIXED QA Contact:
Severity: feature request    
Priority: low CC: m.nolden
Version: 2013-09Flags: m.nolden: Needs_Core_Modification+
Target Milestone: 2014-03   
Hardware: All   
OS: All   
Whiteboard:
CAPA Problembeschreibung:
CAPA Bewertung:
CAPA Ursachenanalyse:
CAPA Lösungsansatz:
CAPA Ergebnis Problembehebung:
CAPA Prüfung:
Story: Feature-/Umsetzungstickets:
Likelihood: ---

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: 
---

    bug-17339-factoryless-new
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.