pfongkye

Hi everyone,

I'm trying to implement a Visualization system using DrawingVisuals to represent thousands of items (as a graph) with forces acting on them (animation). I'm placing the items on a Control deriving from FrameworkElement. Since WPF is a retained graphics system, I'm using a callback attached to the CompositeTarget.Rendering event to do the animation. I've got a BackgroundWorker that computes the positioning of my items which repel each other and the edges of the graph acting as springs.

I'm getting some performance issues when the number of items reaches 1000, knowing that the Vis system has to support thousands...I wanted to know if the method I'm using is correct or is there another better way... The animation has to run till I close the app, so do I have to use CompositeTarget.Rendering for this

Many Thanks,

Pascal.



Re: Windows Presentation Foundation (WPF) thousands of animated (Drawing)Visuals on frameworkElt issue

pfongkye

Hello everyone,

Does anyone know if the way I'm implementing my vis app is the way it should be Where can I look for on the problems I'm getting

Best regards,

Pascal.





Re: Windows Presentation Foundation (WPF) thousands of animated (Drawing)Visuals on frameworkElt issue

Steve Galic - MSFT

The CompositionTarget.Rendering event is the only way to accomplish what you are doing. You may try throttling when you do your updates by skipping frames once and a while. Regular WPF animations have a similar feature with DesiredFrameRate.





Re: Windows Presentation Foundation (WPF) thousands of animated (Drawing)Visuals on frameworkElt issue

pfongkye

hi,
I'll try to do the updates as you said, and I'll also look at how WPF animations are done.
Thanks for your reply,
Pascal.