Page MenuHomePhabricator | MITK

Perfomance loss due to intense (time)geometry clonig
Open, NormalPublic

Description

Status: currently the (time)geometry are cloned a lot; e.g. in simple reinits of the rendering scenes (i.a. for bounding box checks, worldgeometry generation, slice navigator setup...). This has a significant impact (consuming 80% of cpu time on a simple reinit) on the performance and usablity when we start to work with a lot of dynamic data sets (many volumes -> timegeometry with a lot of geometries -> significant more cloning).

This should be optimized.

Following steps/ideas

  1. Time geometries should allow to just keep one internal 3D geometry, if the 3D geometries of all time steps are equal -> This is the case in most situations and it will save a lot of cloning in dynamic cases.
  2. To savely allow #1, we should improve const correctness in TimeGeometries. The 3D geometries should only be returned as const pointers. Otherwise we could get inconsistancy in conjunction with #1, if someone alters a geometry via pointer for a specific time point in a TimeGeometry that was homogenous till then.
  3. Check for unnecessary itkNewMacros instead if itkFactorylessNewMacros in this context.
  4. Check that the DICOM loader, when it assambles the TimeGeometry, also does it efficiently (not a new geometry for each frame, as long as they are equal, but only once for all time steps.

Event Timeline

floca created this task.Mar 12 2019, 11:48 AM
floca triaged this task as Normal priority.

Befor we follow this idea any further, T26167 should be solved and performance should be checked again.

Fixing T26167 should remove a lot of cloning in context of rendering/reinit and it has less dependencies and implications than this proposed task. Thus T26167 could make the issue far less pressing and therefore substantially lower the priority of this task.