<div dir="ltr">On Wed, May 29, 2013 at 4:57 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I agree that the critical sections are probably not necessary.  But<br>
instead of removing them completely, it might be best to add a<br>
boolean method to specify whether they are to be used.<br></blockquote><div><br></div><div style>Sounds good, and this modification still gives a big boost to performance. I'll update my patch.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


I suspect that another thing that is slowing down vtkGlyph3D and<br>
many other algorithms is the fact that vtkDataArray::GetTuple(),<br>
and therefore vtkPoints::GetPoints() which uses it, involves a<br>
virtual method call.  For hot code paths like<br>
vtkLinearTransform::TransformPoints() as defined in<br>
vtkLinearTransform.cxx, a SafeDownCast to vtkFloatArray or<br>
vtkDoubleArray would allow the use of the inlined GetTupleValue()<br>
and SetTupleValue() methods.<br></blockquote><div><br></div><div style>Thanks for the pointer, I'll take a look at this next.</div><div style><br></div><div style>Dave </div></div></div></div>