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
Status: RESOLVED FIXED
Product: MITK
Classification: Unclassified
Component: Core
2013-09
All All
: low feature request
: 2014-03
Assigned To: Sascha Zelzer
:
Depends on:
Blocks:
  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:
Story:
Feature-/Umsetzungstickets:
Likelihood: ---
m.nolden: Needs_Core_Modification+


Attachments

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

    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.