[vtkusers] Profiling VTK 5.6

Affolter Martin martin.affolter at ntb.ch
Wed Sep 15 04:29:43 EDT 2010


Hi everyone

About a year ago I noticed a performance drop moving from VTK 4.4 to VTK 5.4.2. Back then I decided to stick with 4.4 since I did not find the time and means to analyse the problem and also because VTK 5.4.2 just wasn't fast enough for our CAD-Application.

Now I'm at it again, this time with Visual Studio 2010 and a profiler at hands.

What we do:
- Visualize geometric models (mostly tools) in a CAD-Application named ClassCAD
- Models are tessellated by the geometry kernel which produces meshes and tessellated curves
- These meshes and curves are then passed to VTK
- For each mesh/curve/vertex we create a pipeline using vtkPolyData, vtkPolyDataMapper and vtkActor
- There can be thousands of meshes/curves/vertices and therefore just as many pipelines
- We must be able to select each element (actor) separately
- If the model changes (parametric), the whole visualization-process restarts. We do not manipulate data in the vtk-pipeline.

All this was possible with VTK 4.4 with a high performance.

With VTK 5.6 I observe...

1. A higher consumption of memory
2. A poor performance when interacting with the window (see profiling results)

Hardware:
- intel core2 quad 2.83 GHz
- 3.25 GB Ram
- ATI radeon HD 3400 series (latest drivers)

OS:
- Windows XP SP3

My questions:
- How can I influence the pipeline to make it run faster (specific to what we use vtk for)?
- Does anyone of the developers see anything "suspicious" in the profiling results?
- Any other ideas or hints besides http://www.cmake.org/Wiki/VTK_FAQ#How_to_handle_large_data_sets_in_VTK ?

Thanks a lot for any help.

==============================================================================================================================
Profiling Results ClassCAD with VTK 5.6 (Interaction only)

Hot Path
Function Name												Inclusive Samples %	Exclusive Samples %
ClassCAD.ManVTKView.HandleWindowMessage(native int,int32,native int,native int)	20.74				0.00
vtkRenderWindow::DoStereoRender(void)								17.48				0.00
vtkStreamingDemandDrivenPipeline::Update(int)							15.76				0.26
vtkDemandDrivenPipeline::UpdateDataObject(void)						8.78				0.11
vtkExecutive::GetOutputData(int)									7.66				0.13

Functions Doing Most Individual Work
Name														Exclusive Samples %
vtkInformation::GetAsObjectBase(class vtkInformationKey *)					19.53
[atioglxx.dll]												10.79
vtkPainter::UpdateBounds(double * const)								6.36
vtkAlgorithm::GetNumberOfOutputPorts(void)							3.86
vtkInformationVector::GetInformationObject(int)						3.86

==============================================================================================================================
Profiling Results ClassCAD with VTK 4.4 (Interaction only)

Functions Doing Most Individual Work
Name														Exclusive Samples %
[atioglxx.dll]												27.84
vtkActor::GetBounds(void)										12.05
vtkFrustumCoverageCuller::Cull(class vtkRenderer *,class vtkProp * *,int &,int &)	5.23
vtkPolyDataMapper::GetBounds(void)									5.17
vtkActor::GetIsOpaque(void)										4.78



Regards

Martin Affolter

Interstaatliche Hochschule für Technik Buchs NTB
Institut für Ingenieurinformatik
NTB Campus Waldau St.Gallen
Schönauweg 4 / Postfach
9013 St. Gallen
Tel. ++41 81 755 32 49
Fax  ++41 81 755 32 01

http://institute.ntb.ch/inf.html 





More information about the vtkusers mailing list