[vtkusers] How to visualize thousands of actors with good performance

Affolter Martin martin.affolter at ntb.ch
Thu Sep 30 02:20:50 EDT 2010


Yes, the vtk Dlls are built in release configuration with debug information for the profiler (.pdb). We're using VisualStudio 2010.

Martin

Do you build these in Release configuration?

On Wed, Sep 29, 2010 at 3:24 AM, Affolter Martin <martin.affolter at ntb.ch> wrote:
> Sean
>
> Thanks for your reply.
>
> First some information on our Hard- and Software:
> VTK: v 5.6
> OS: Windows XP SP3
> CPU: Intel Core2 Quad 2.83 GHz
> RAM: 3.25 GB
> GPU: ATI radeon HD 3400 series (latest drivers)
>
> We're developing in Visual Studio 2010 which comes with a profiler. I profiled the application in "sample-mode" which means, the profiler looks at the stack in certain intervals and sums up the occurrence of the functions on the stack. Inclusive samples means the function is on the stack, exclusive samples means the function is being processed by the cpu.
>
> Following recorded data is during rotation only, using static mappers. The first part is the "hot path" shown in the summary. Subpaths (A) and (B) are listed in detail below:
>
>
> ----------------------------------Profiling results------------------------------->
>
> Function Name   Inclusive Samples       Exclusive Samples       Module Name
>
> ARinnotech.exe  9'232   0
> __CorExeMain_Exported at 0 9'230   0       mscoree.dll
> Unknown Frame(s)        9'194   0       UNKNOWN
> (A) ClassCAD.ManVTKView.HandleWindowMessage(native int,int32,native int,native int)     2'979   0       DotNetInterface.dll
> (B) vtkRenderWindow::DoStereoRender(void)       2'321   0       vtkRendering.dll
> (C) [atioglxx.dll]      1'004   165     atioglxx.dll
>
> (A) ClassCAD.ManVTKView.HandleWindowMessage(native int,int32,native int,native int)     2'979   0       DotNetInterface.dll
> StubHelpers::SetLastError(void) 2'979   0       clr.dll
> ClassCAD::VTKView::HandleWindowMessage(struct HWND__ *,unsigned int,unsigned int,long)  2'979   0       VTKGrEditor.dll
> ClassCAD::ClassCadInteractor::HandleWindowMessage(struct HWND__ *,unsigned int,unsigned int,long)       2'979   0       VTKGrEditor.dll
> vtkWin32RenderWindowInteractor::OnMouseMove(struct HWND__ *,unsigned int,int,int)       2'979   0       vtkRendering.dll
> vtkObject::InvokeEvent(unsigned long,void *)    2'978   0       vtkCommon.dll
> vtkSubjectHelper::InvokeEvent(unsigned long,void *,class vtkObject *)   2'978   0       vtkCommon.dll
> vtkCallbackCommand::Execute(class vtkObject *,unsigned long,void *)     2'977   0       vtkCommon.dll
> ClassCAD::InteractorStyleTrackballSelection::OnMouseMove(void)  2'977   0       VTKGrEditor.dll
> ClassCAD::InteractorStyleTrackballSelection::Rotate(void)       2'721   0       VTKGrEditor.dll
> vtkRenderer::ResetCameraClippingRange(void)     2'036   0       vtkRendering.dll
> vtkRenderWindowInteractor::Render(void) 684     0       vtkRendering.dll
> vtkRenderWindow::Render(void)   683     0       vtkRendering.dll
> vtkObject::InvokeEvent(unsigned long,void *)    673     0       vtkCommon.dll
> vtkSubjectHelper::InvokeEvent(unsigned long,void *,class vtkObject *)   673     504     vtkCommon.dll
>
> (B) vtkRenderWindow::DoStereoRender(void)       2'321   0       vtkRendering.dll
> vtkRendererCollection::Render(void)     2'321   0       vtkRendering.dll
> vtkRenderer::Render(void)       2'321   88      vtkRendering.dll
> vtkRenderer::AllocateTime(void) 2'223   38      vtkRendering.dll
> vtkFrustumCoverageCuller::Cull(class vtkRenderer *,class vtkProp * *,int &,int &)       2'163   151     vtkRendering.dll
> vtkActor::GetBounds(void)       2'000   129     vtkRendering.dll
> vtkPainterPolyDataMapper::GetBounds(void)       1'776   69      vtkRendering.dll
> vtkPainter::UpdateBounds(double * const)        570     488     vtkRendering.dll
> vtkPolyDataMapper::GetInput(void)       548     3       vtkRendering.dll
> vtkExecutive::GetNumberOfInputConnections(int)  289     106     vtkFiltering.dll
> vtkExecutive::InputPortIndexInRange(int,char const *)   144     69      vtkFiltering.dll
> vtkAlgorithm::GetNumberOfInputPorts(void)       75      75      vtkFiltering.dll
>
> <---------------------------------Profiling results-------------------------------
>
> Your stack trace and subpath B seem to start off identically but then different functions are consuming more cpu time... Maybe that's because of the static mappers. Do you see anything suspicious?
>
> What vtk Version do you use and how is the performance rotating your 10'000 actors scene?
>
> Regards
> Martin Affolter
>
> -----Ursprüngliche Nachricht-----
> Von: Sean McBride [mailto:sean at rogue-research.com]
> Gesendet: Dienstag, 28. September 2010 19:03
> An: Affolter Martin; 'Bill Lorensen'
> Cc: vtkusers at vtk.org
> Betreff: Re: [vtkusers] How to visualize thousands of actors with good performance
>
> On Tue, 28 Sep 2010 15:04:54 +0200, Affolter Martin said:
>
>>Thanks for your suggestion. I had tried static mappers before,
>>unfortunately without the Update()-call. Now I understand why the faces
>>didn't show the first time (only edges and vertices). Anyway I tried it
>>again just now. There is a slight performance increase noticable, but
>>still no match to the performance in VTK 4.4., where the scene (8000
>>actors) can be rotated smoothly.
>
> Have you tried profiling your app?  Where are the bottlenecks?
>
> (What OS are you on?  If Mac OS X, you can use Instruments.app to
> measure where your bottlenecks are.  I'm sure other OSes have similar tools.)
>
> In our case, when we have about 10000 actors, and rotate the scene, the
> heaviest stack trace is:
>
> main
> ...
> -[vtkCocoaGLView drawRect:]
> vtkRenderWindow::Render()
> vtkRenderWindow::DoAARender()
> vtkRenderWindow::DoFDRender()
> vtkRenderWindow::DoStereoRender()
> vtkRendererCollection::Render()
> vtkRenderer::Render()
> vtkOpenGLRenderer::DeviceRender()
> vtkRenderer::UpdateGeometry()
> vtkActor::RenderOpaqueGeometry(vtkViewport*)
> vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*)
> vtkPolyDataMapper::Render(vtkRenderer*, vtkActor*)
> vtkPainterPolyDataMapper::RenderPiece(vtkRenderer*, vtkActor*)
> vtkDefaultPainter::Render(vtkRenderer*, vtkActor*, unsigned long, bool)
> vtkPainter::Render(vtkRenderer*, vtkActor*, unsigned long, bool)
> vtkPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)
> vtkPainter::Render(vtkRenderer*, vtkActor*, unsigned long, bool)
> vtkOpenGLScalarsToColorsPainter::RenderInternal(vtkRenderer*, vtkActor*,
> unsigned long, bool)
> vtkPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)
> vtkPainter::Render(vtkRenderer*, vtkActor*, unsigned long, bool)
> vtkOpenGLClipPlanesPainter::RenderInternal(vtkRenderer*, vtkActor*,
> unsigned long, bool)
> vtkPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)
> vtkPainter::Render(vtkRenderer*, vtkActor*, unsigned long, bool)
> vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer*, vtkActor*,
> unsigned long, bool)
> gleCallList
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
>



More information about the vtkusers mailing list