[vtkusers] Poor VTK pipeline performance with filters with high fan-out and also many actors/mappers

James Johnston JamesJ at motionview3d.com
Tue Jan 7 11:12:38 EST 2014


> I am very interested in VTK. However, so far tested only superficially.
> In one of the tests I have mapped each of my 10,000 objects as an individual
> actor.
> You can imagine that this approach has a big performance problem.
> As far as I can see, also "GetMTime()" is to blame for this.
> 
> TL: TR:
> Did you get any answers to your question or made ​​progress?

I never got any answers.  I made a workaround by making a custom executive that caches its modified time.  Cached values are reset after every frame or interaction.  There is a lot of code to it but that was the basic idea.  I think it should work as long as a VTK pipeline doesn’t modify itself but it probably violates some basic assumptions of the VTK pipeline.  That said, I haven't noticed any side effects in our (big) application yet.

But my workaround worked because VTK was recursively calling the same executives over & over to compute modified time.  If you just made 10,000 individual objects without a big pipeline behind them then it might not help you.

> Maybe you have found a sane way to handle the mapper "Static" flag
> yourself properly?

I can't think of a way to use the Static flag without breaking the pipeline.  Our application is too complex to practically maintain this flag, but for a simple program it might be a workable scheme.  Did you find that setting this flag made a big difference in your frame rate?  It made a massive difference in my case, which was my clue to look into bypassing pipeline MTime computation.  If it doesn't make much (or enough difference), I am not sure there is a good, easy workaround for you.



More information about the vtkusers mailing list