[vtk-developers] traversal using vtkCollection::GetItemAsObject

Andreas Buykx A.Buykx at dianafea.com
Fri Feb 24 06:08:24 EST 2017


Hi,

I've run into a performance problem with vtkAppendFilter, caused by iterating over a large number of inputs. The input data sets are stored in a vtkDataSetCollection (by GetNonEmptyInputs) and then the collection is iterated over using vtkDataSetCollection::GetItem. The vtkCollection is a linked list and therefore traversal using random access is slow, moreover it supports linear traversal in a much faster way using vtkDataSetCollection::GetNextItem.

An alternative that would probably be even  faster is to introduce a pimpl-struct and store the inputs in a std::vector<vtkDataSet*>.

I am starting a topic (collection-traversal) to change the loops in vtkAppendFilter accordingly. I found similar loops in vtkGridSynchronizedTemplates3D and vtkContourHelper. Should I replace those too?


Kind regards,
Andreas

DIANA FEA BV
Software Developers and Analysis Consultants for Civil and Geotechnical Engineering

Delftechpark 19a, 2628XJ, Delft, The Netherlands
Tel: +31 88 34262 15 (Direct) │ Tel: +31 88 34262 00 (Switchboard) │ Fax: +31 88 34262 99
http://dianafea.com<http://dianafea.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170224/1178bc85/attachment.html>


More information about the vtk-developers mailing list