Performance problem when adding a new polygon (rectangularise.cxx)
Mantis Issue 48, reported by gborrut, assigned to echristophe, created: 2008-12-09
The polygons insertion in a structure representing a document, using :
tree->add(newPolygon, ...
seems to take too much time. The time spent for a polygon insertion appears to be proportional to the number of polygons ever inserted.
1230880608 - christopThe Add method of the itkTreeContainer is the reason: we go through the entire tree each time an element is added.
http://www.orfeo-toolbox.org/doxygen-current/itkTreeContainer_8txx-source.html
A more efficient implementation for the tree is needed.
1238593968 - christopFixed by replacing tree->add() by tree->AddChild()