Skip to content

Improve vtkStructuredGrid rendering performance

Steven Hahn requested to merge quantumsteve/vtk:FasterGetCell into master

By profiling volume rendering of a vtkStructuredGrid with blank cells in ParaView, I found that much of the time was being spent constructing and destructing hexahedron and empty cells. Every time a blank cell is found, the previous cell must be destroyed and new empty cell constructed. The next visible cell will destroy this empty cell and construct a new hexadron.

Changing the member function to construct both cell types once inside the vtkStructuredGrid eliminates this overhead. Saving a screenshot of a volume representation of neutron scattering data is about 2 times faster.

Merge request reports