Skip to content

Improve vtkPVArrayInformation::CopyFromArray performance

Léon Victor requested to merge leon.victor/paraview:array-info-optim-2 into master

Follow up to !6900 (merged)

Avoid some costly string comparison by accessing field data arrays by index rather than by name

Added two new vtkPVArrayInformation::CopyFromArray(vtkAbstractArray*) and vtkPVArrayInformation::CopyFromArray(vtkFieldData*, int) overloads, and deprecated the existing vtkPVArrayInformation::CopyFromArray(vtkAbstractArray*, vtkFieldData*).

This change makes the distinction explicit. This allows us to make sure to not repeatedly loop over the field data's arrays using costly string comparisons. This results in notable performance improvements during PV's pipeline updates for datasets with a large number of arrays.

Edited by Léon Victor

Merge request reports

Loading