[vtk-developers] [VTK 0013851]: Serious performance issue in vtkGraphs when removing vertices
Mantis Bug Tracker
mantis at public.kitware.com
Fri Feb 1 12:21:20 EST 2013
The following issue has been SUBMITTED.
======================================================================
http://www.vtk.org/Bug/view.php?id=13851
======================================================================
Reported By: Matthias Schneider
Assigned To:
======================================================================
Project: VTK
Issue ID: 13851
Category: (No Category)
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: backlog
Project: TBD
Type: performance
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 2013-02-01 12:21 EST
Last Modified: 2013-02-01 12:21 EST
======================================================================
Summary: Serious performance issue in vtkGraphs when removing
vertices
Description:
vtkGraph seems to have a serious bottleneck when removing vertices from the
graph structure.
vtkGraph::RemoveVerticesInternal() internally calls
vtkGraph::RemoveVertexInternal() which recomputes the edge list structure in
every call:
vtkGraph.cxx:1458ff
this->ForceOwnership();
this->BuildEdgeList(); // This function assumes the edge list is created.
I am not totally sure abut the additional comment concerning the assumption.
I could not find any reason for an unconditional update of the edge list so far.
Therefore, I'd suggest to add the following condition:
this->ForceOwnership();
if (!this->EdgeList) {
this->BuildEdgeList();
}
Other functions seem to call BuildEdgeList() with exactly the same condition.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-02-01 12:21 Matthias SchneiderNew Issue
======================================================================
More information about the vtk-developers
mailing list