<div dir="ltr">Hi Elvis,<div><br></div><div>I don't think there are any fans of vtkCollection, but replacing it</div><div>with something modern would be lot of work and would provide</div><div>far less benefit than e.g. the recent reworking of the VTK data</div><div>arrays to provide flexible memory access patterns.</div><div><br></div><div>Also, given the cost for vtkRenderer to render a bunch of props,</div><div>you would have to be doing many hundreds (thousands?) of</div><div>insertions/removals per render before the time required for those</div><div>operations becomes significant to overall app performance.</div><div><br></div><div>  David</div><div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 13, 2018 at 3:33 PM Elvis Stansvik <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
The props of a vtkRenderer are kept in a vtkCollection (and probably<br>
have been since VTKs childhood), meaning linear time<br>
search/insert/remove.<br>
<br>
I realize the use of vtkCollection is pervasive in these classes, and<br>
also shines through in their API, so this is a bit of a long shot,<br>
but, is there any chance that it'll at some point be converted to use<br>
a sorted data structure, to permit logarithmic operations?<br>
<br>
Has anyone else had the need to rapidly insert/remove/check for props<br>
in a renderer with a large amounts of props in it? Has the idea of<br>
having vtkRenderer backed by something else been discussed before?<br>
<br>
Cheers,<br>
Elvis<br>
</blockquote></div></div></div>