PolydataMapper consumes too much system memory for large datasets
This documents a memory consumption issue with the polydata mappers (Desktop GL and GLES). It is noticeable when rendering 10000 or more objects with vtkCompositePolyDataMapper2
which internally use vtkPolyDataMapper
to minimize number of OpenGL data uploads. While there are no known leaks, the memory consumption is unexpectedly high.
In GLES 3.0, the mapper duplicates shared vertices so that explains higher memory usage than desktop GL. In any case, the RAM usage is more than double the actual size of the datasets. The GLES 3.0 mapper was meant for consumption in the browser through WebAssembly where memory is a scarce resource (limited to 2GB). The limit is easily hit for 3 million triangles.
These memory profiles can be reproduced with scripts and datasets found at vtk-polydata-mapper-memory