Large number of data arrays causes lag in ParaView GUI
When selecting a source in the ParaView pipeline, that has a large number of data arrays (several thousand), the ParaView GUI takes a very long time to react.
Tested with ParaView 5.8.1 Linux binaries from paraview.org.
Steps to reproduce
Create a sphere source and a programmable source with this code:
import vtk
for i in range(4096):
d = vtk.vtkIntArray()
d.SetName('Array_{}'.format(i))
d.SetNumberOfComponents(1)
d.SetNumberOfTuples(5)
output.GetFieldData().AddArray(d)
ParaView already takes about 20s when first pressing apply (see log below). Similar lags are observed when changing the selection to the sphere source and back to the programmable source.
Debug log
( 20.204s) [paraview ]pqProxyInformationWidge:191 9| . { update-information-panel for `ProgrammableSource1`
( 20.204s) [paraview ]pqCompositeDataInformat:728 9| . . { reset
( 20.204s) [paraview ]pqCompositeDataInformat:728 9| . . } 0.000 s: reset
( 20.355s) [paraview ]pqProxyInformationWidge:191 9| . } 0.152 s: update-information-panel for `ProgrammableSource1`
( 41.066s) [paraview ] vtkSISourceProxy.cxx:229 9| . { ProgrammableSource1: update pipeline(0, 0.000000, true)
( 41.066s) [paraview ] vtkSISourceProxy.cxx:229 9| . } 0.000 s: ProgrammableSource1: update pipeline(0, 0.000000, true)
( 41.066s) [paraview ] vtkSMProxy.cxx:1258 9| . PostUpdateData (ProgrammableSource1)