[vtk-developers] Performance issue regarding vtkOpenGLGlyph3DMapper with large number of vtkDatasets

David Thompson david.thompson at kitware.com
Mon Apr 9 11:36:59 EDT 2018


Hi Haocheng,

> I have a use case that I want to glyph several hundreds of vtkDatasets. However, the frame rate becomes super slow since vtkOpenGLyph3DMapper would call rebuildstructures function for each dataset. With 258 vtkDatasets, it takes more than 4 seconds to render one frame and spends 52% of the time doing rebuilding stuff(Rebuilding the structure 258 times even though nothing new!). I'm thinking to remove Line 515 in /Rendering/OpenGL2/vtkOpenGLGlyph3DMapper.cxx and pass a flag instead to trigger the rebuilding if a new color is assigned.

I'm not sure that change would not be enough to guarantee that the vtkOpenGLGlyph3DMapper::vtkOpenGLGlyph3DMapperEntry objects are kept up to date.

It might be better to understand why the mapper's MTime is being updated every render. If we can't use the mapper's MTime, then we should probably add a new MTime member to the mapper that gets modified when things that *do* matter (like block color changes) occur.

	David


More information about the vtk-developers mailing list