[vtkusers] Performance VTK 4.4 vs. VTK 5.4.2, more info

Berk Geveci berk.geveci at kitware.com
Thu Sep 24 08:47:51 EDT 2009


Does setting Static to 1 on all mappers make a difference?

 // Description:
  // Turn on/off flag to control whether the mapper's data is static.
Static data
  // means that the mapper does not propagate updates down the pipeline, greatly
  // decreasing the time it takes to update many mappers. This should only be
  // used if the data never changes.
  vtkSetMacro(Static,int);
  vtkGetMacro(Static,int);
  vtkBooleanMacro(Static,int);

-berk

On Thu, Sep 24, 2009 at 2:34 AM, Affolter Martin <martin.affolter at ntb.ch> wrote:
> Hi Utkarsh
>
> I am not using immediate mode rendering, at least I never switched it on. I looked into the the vtkMapper.cpp, it seems that the immediate mode rendering is off by default. I did not try to call ImmediateModeRenderingOff() as I am not expecting it to behave differently (unless you know better and insist on trying it).
>
> Is there any documentation on the changes between VTK 4.4 and 5.x?
>
> Martin
>
> ________________________________
>
> Von: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
> Gesendet: Dienstag, 22. September 2009 16:30
> An: Affolter Martin
> Cc: vtkusers at vtk.org
> Betreff: Re: [vtkusers] Performance VTK 4.4 vs. VTK 5.4.2, more info
>
>
> Are you using immediate mode rendering? Call ImmediateModeRenderingOff() on all the mappers to ensure that display lists are used. If display list are not used, then I am not surprised VTK 5.4 is slower than VTK 4.4 dramatically since there were changes in rendering pipeline to make it more customizable, like addition of painters, which affect rendering performance due to additional virtual calls.
>
> Utkarsh
>
>
> On Tue, Sep 22, 2009 at 9:51 AM, Affolter Martin <martin.affolter at ntb.ch> wrote:
>
>
>        Thanks for your replies. It seems that I am not the only one experiencing a performance drop in VTK 5.4.2 compared to VTK 4.4. As I mentioned before, we use VTK to visualize 3d-models in our CAD-Application. I have compared the time to visualize a certain model with 4.4 vs. 5.4.2. Except for some replaced deprecated methods, our code remained the same, so the differences must come from VTK. There is also a remarkable difference when interacting with the window. Unfortunately I don't have any values (fps) to present at this moment.
>
>        It looks like we're going to stick with 4.4 for now. Comments are welcome.
>
>        Here are the details:
>
>        1. Time to visualize model (includes creating actors and rendering the scene) (h:m:s)
>        -------------------------------------------------------------------------------------
>        VTK 4.4 release (measured 3 times):
>        0:0:6.266
>        0:0:6.922
>        0:0:7.032
>
>        VTK 5.4.2 release (measured 4 times):
>        0:0:22.516
>        0:0:29.438
>        0:0:26.110
>        0:0:27.032
>
>
>        2. Visualized model (screenshot)
>        --------------------------------
>        Entities        Faces   Edges   Vertices
>        1               20      51      34
>        2               137     370     240
>        3               211     523     321
>        4               25      66      44
>        5               104     299     197
>        6               104     299     197
>        7               86      237     156
>        8               26      69      46
>        9               246     680     448
>        10              81      231     154
>        11              39      111     74
>        12              284     761     486
>        13              84      243     162
>        ----------------------------------
>                       1447    3940    2559
>        ----------------------------------
>        Total number of Actors          7946
>        ==================================
>
>
>        3. Used VTK-Classes
>        -------------------
>        Edges:          vtkActor, vtkPoints, vtkPolyData, vtkPolyDataMapper
>        Faces(Meshes):  vtkActor, vtkPoints, vtkPolyData, vtkCellArray, vtkPolyDataNormals, vtkPolyDataMapper
>        Vertices:               vtkActor, vtkPoints, vtkPolyData, vtkVertex, vtkPolyDataMapper
>
>
>        4. Used Hardware
>        ----------------
>        Intel Pentium D(ual core) 3.2GHz
>        2GB Ram
>        ATI Radeon X1300 Series
>
>        Regards
>        Martin
>
>
>        ---
>
>        Original Message:
>
>        Dear VTKUsers
>
>        I've been looking into the vtkusers archive for a while now, and it helped me solve my vtk-problems in most cases. We use VTK in a CAD Application and decided to move from version 4.4 to the latest release, which is 5.4.2 at this time. So I downloaded the sources, made a VS2008 solution with Cmake and built the libs and dlls. Besides replacing some deprecated methods I did not have to change anything in our code. No compiler-warnings, no errors (of course).
>
>        When I tested version 5.4.2 against 4.4 I found out, that 5.4.2 takes about 3-4 times longer to visualize a 3d-model of some robot-arm than version 4.4 did. The rendering while interacting is also very, very slow. Can anybody confirm such a performance drop? If so, then I think we might stick to v4.4 a little longer, if not, then I'll have to figure out what went wrong in my tests.
>
>        Thanks
>        Martin
>        _______________________________________________
>        Powered by www.kitware.com
>
>        Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
>        Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
>        Follow this link to subscribe/unsubscribe:
>        http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list