[vtk-developers] Better than O(n) prop operations on vtkRenderer

David Gobbi david.gobbi at gmail.com
Thu Dec 13 18:06:37 EST 2018


Hi Elvis,

I don't think there are any fans of vtkCollection, but replacing it
with something modern would be lot of work and would provide
far less benefit than e.g. the recent reworking of the VTK data
arrays to provide flexible memory access patterns.

Also, given the cost for vtkRenderer to render a bunch of props,
you would have to be doing many hundreds (thousands?) of
insertions/removals per render before the time required for those
operations becomes significant to overall app performance.

  David


On Thu, Dec 13, 2018 at 3:33 PM Elvis Stansvik <elvis.stansvik at orexplore.com>
wrote:

> Hi all,
>
> The props of a vtkRenderer are kept in a vtkCollection (and probably
> have been since VTKs childhood), meaning linear time
> search/insert/remove.
>
> I realize the use of vtkCollection is pervasive in these classes, and
> also shines through in their API, so this is a bit of a long shot,
> but, is there any chance that it'll at some point be converted to use
> a sorted data structure, to permit logarithmic operations?
>
> Has anyone else had the need to rapidly insert/remove/check for props
> in a renderer with a large amounts of props in it? Has the idea of
> having vtkRenderer backed by something else been discussed before?
>
> Cheers,
> Elvis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtk-developers/attachments/20181213/a729e2a4/attachment.html>


More information about the vtk-developers mailing list