[vtk-developers] Performance tuning

Prabhu Ramachandran prabhu_r at users.sf.net
Mon Jul 4 05:48:01 EDT 2005


Hi Ken,

>>>>> "Ken" == Ken Martin <ken.martin at kitware.com> writes:

    Ken> it may still have some significant overhead in it. We will
    Ken> look into that soon as well. If you do have a slow test case
    Ken> I would be curious to hear how these changes impact your
    Ken> results.

I haven't yet tested your new enhancements but do have a *very* simple
python script that indicates the FPS for 2000 spheres rendered using
three different approaches.  The first just creates individual sphere
actors and renders them all, the second sticks the actors into an
assembly and the third uses vtkAppendPolyData to create one actor.
Simply run the script like so:

 python spheres.py [option]

where option is 1, 2 or 3 and selects the appropriate option.   Here
are some numbers (all approximate).

VTK-4.4:

   $ python spheres.py 1
   Time taken to create and add actors: 0.45 secs 
   FPS: 18

   $ python spheres.py 2
   Time taken to create and add actors: 0.45 secs
   FPS: 2.7

   $ python spheres.py 3
   Time taken to create and add actors: 0.4 secs
   FPS: 30

VTK-CVS (built on 25th June, 2005)

    $ python spheres.py 1
    Time taken to create and add actors: 2.17 secs
    FPS: 3.2

    $ python spheres.py 2
    Time taken to create and add actors: 2.17 secs
    FPS: 1.28

    $ python spheres.py 3
    Time taken to create and add actors: 388.57 secs
    FPS: 6.5


Notice the whopping 388 seconds for the last option!  I've attached my
script and will check your enhancements.

cheers,
prabhu



More information about the vtk-developers mailing list