View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001465VTK(No Category)public2005-01-12 03:182005-08-08 14:15
ReporterYianis Nikolaou 
Assigned ToKen Martin 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001465: Performance decrease in vtk 4.5 when using large number of actors.
Description//On a PIV3.06HT
//When using vtk 4.4, n_actors can go up to 30000 //and still maintain interactive refresh rates.

//In vtk 4.5, the refresh rate with values around //600 are comparable to values 30000 in 4.4.

int r_verts[4];
const int n_actors = 600;
double dz=30./n_actors;
for(double z=0; z<30; z+=dz) {
  r_points = vtkPoints::New();
  r_polys = vtkCellArray::New();
  r_pdata = vtkPolyData::New();
  r_mapper = vtkPolyDataMapper::New();
  r_actor = vtkActor::New();

  r_points->InsertNextPoint( 0., 0., z);
  r_points->InsertNextPoint(10., 0., z);
  r_points->InsertNextPoint(10., 10., z);
  r_points->InsertNextPoint( 0., 10., z);

  r_points->InsertNextPoint( 0., 0., z+dz);
  r_points->InsertNextPoint(10., 0., z+dz);
  r_points->InsertNextPoint(10., 10., z+dz);
  r_points->InsertNextPoint( 0., 10., z+dz);

  r_verts[0] = 0; r_verts[1] = 1;
  r_verts[2] = 5; r_verts[3] = 4;
  r_polys->InsertNextCell(4, r_verts);

  r_verts[0] = 1; r_verts[1] = 2;
  r_verts[2] = 6; r_verts[3] = 5;
  r_polys->InsertNextCell(4, r_verts);

  r_verts[0] = 2; r_verts[1] = 3;
  r_verts[2] = 7; r_verts[3] = 6;
  r_polys->InsertNextCell(4, r_verts);

  r_verts[0] = 3; r_verts[1] = 0;
  r_verts[2] = 4; r_verts[3] = 7;
  r_polys->InsertNextCell(4, r_verts);

  r_pdata->SetPoints(r_points);
  r_pdata->SetPolys(r_polys);
  r_mapper->SetInput(r_pdata);
  r_actor->SetMapper(r_mapper);
            r_actor->GetProperty()->SetRepresentationToWireframe();

  renderer->AddActor(r_actor);

  r_points->Delete();
  r_polys->Delete();
  r_pdata->Delete();
  r_mapper->Delete();
  r_actor->Delete();
}
TagsNo tags attached.
Project
Type
Attached Filesrar file icon large_number_of_actors.rar [^] (16,700 bytes) 1969-12-31 19:00

 Relationships

  Notes
(0001869)
Brad King (developer)
2005-01-12 11:29

I'm assigning this to myself because it is definately related to the new pipeline changes. Due to the complexity of the new pipeline there will be a performance hit we cannot avoid, but there are definately some things we can change to reduce the hit significantly.
(0002722)
Brad King (developer)
2005-07-26 09:37

I'm assigning this to Ken because he has been working on new pipeline update time optimization. Significant improvements have been made in the refresh time. The construction of the pipeline can be sped up by using the vtkObjectBase::FastDelete method.
(0002821)
Ken Martin (developer)
2005-08-08 14:15

Some performance improvments were made to the new pipeline so that it is much faster (like 10x). It is still not as fast as VTK 44. To help compensate I added a StaticOn method to vtkMapper that can be set after the first render to indicate that a mapper is static (it's data is not changing). When this is on the render rate on my tests is actually better than with VTK 4.4.

 Issue History
Date Modified Username Field Change
2011-06-16 13:11 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team