This project is read-only.

Rendering Performance, what about the DirectX approach

Oct 19, 2010 at 10:54 PM

Hi folks,

i'm currently testing if ddd will match our requirements regarding performance. therefore i have built a little app that has n data sources generating 2048 data points very fast (100Hz/sleep 10) and use ddd to display the data. I have built my own custom control hosting the chartplotter and refresh it using a dispatcher timer to decouple data generation from displaying/refreshing.

my control refreshes the plot (if necessary) every 250ms (this means 4Hz) which is far away from realtime, but however would be acceptable.

Here is what i experienced:

When using 9 of these charts (3x plots on screen) cpu load varies depending on how large i size the window. When i scale to a small window i got around 14% cpu load, which would be acceptable since it gives room  for even more data to be charted and already is a kind of heavy load scenario for our purpose. BUT, when i size the window to fullscreen (1600x1200) cpu load goes up to 50% which shows that the rendering process itself takes very long to draw all the stuff.

Why is this the case? Is WPF itself the reason for the slow down? I come to nearly similar cpu loads on my virtual machine (using parallels) with WPF HW acceleration turned off compared to my faster work pc running windows 7 natively and wpf hw acceleration turned on (there is a registry toggle for that, and i have to disable it on my virtual machine, because blend caused render bugs). OK, the resolution of the work pc is in fact higher and cpu load is about 45% and not 50% like on the vm.

But how can this happen? I have not used performance tools like dotTrace to look into it, but for me it would be interesting to know how the actual size of chart can have such an impact on performance. the number of data points is the same, just the plain (hw accelerated) painting takes even long if the window is bigger.

@Mikhail/the century: I remember that you conducted a little quickndirty sample of using some sort of directx D3DImage stuff to increase rendering performance. However it did not compile or run on my pc without problems. How much would it afford to bring this approach to a "stable" nightly build? I'm again and again seeing people having problems finding a good flexible AND FAST charting library, ddd could be a great solution to this problem but i think it is too slow in the current state.

Any comments/discussions/help are very appreciated.




Oct 19, 2010 at 11:34 PM

Hi All,

I wanted to let everyone know that I have done a lot of work to get DirectX working based on the example in the nightly build.

Just to let you know, I am seeing upwards of 70-80 FPS plotting 2048 data points at 50hz using one LineGraph. Using multiple LineGraphs, I am seeing around 30 FPS. All rendering is offloaded to the GPU, so the CPU cycles are almost nothing.

As I cannot transfer files from my work PC, I will have to do it from home. I will set it on my calendar and try to do it tomorrow while I am at a conference. If you don't see by Thursday, then hound me a little till I post it =).


Oct 20, 2010 at 12:17 AM

I was just going over my current implementation and realized I never quite figured out how to handle losing the DirectX device like in the case of locking the computer screen and coming back. In this case, I would like to get that worked out and it should only take me a couple of hours of dev time to get it going. I will post the source as soon as I get this handled properly. Thanks.

Oct 20, 2010 at 1:45 PM

Hello Foxman13,

that sounds promising. I remember from the nighly build example, that it was not possible to zoom and scroll in the view. Is this the price one have to pay when using the directx approach? Would not be a killer in our case anyway. I'm looking forward for your post. Let me know, by dripping a note here.



Oct 20, 2010 at 2:13 PM

I have it working just like the normal WPF LineGraph, so it supports panning and zooming.

Oct 20, 2010 at 3:11 PM

Oh wow, that sounds even more promising. Will this be published by your self somewhere else or will it be checked in to the current repository? I'm very exited!

Oct 20, 2010 at 3:16 PM
I don't have access to the repository, so I will have to get it to you guys myself. I will probably post it on SkyDrive or something. Anyways, I am at a Microsoft launch event today and tomorrow, so it will probably be Friday before I can get it posted.

Jason Fox
Oct 22, 2010 at 8:34 PM

Hi Jason,

did you have time already to upload something?



Oct 22, 2010 at 8:40 PM
No, I still have a weird issue to resolve where DirectX is leaving render targets in the GPU after a reset and this causes performance to degrade over time. After that, it should be at a serviceable level for you guys to use. I will try to get it done today, so that I can upload it when I get home tonight.

On Fri, Oct 22, 2010 at 2:34 PM, oldpasch <> wrote:

From: oldpasch

Hi Jason,

did you have time already to upload something?



Read the full discussion online.

To add a post to this discussion, reply to this email (

To start a new discussion for this project, email

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at

Jason Fox
Oct 22, 2010 at 8:42 PM

ok, that would be cool. take your time!

thanks in advance!

Oct 25, 2010 at 4:25 PM

Just wanted to let you know I haven't forgotten about getting this out. I ran accross a performance issue on Friday and hope to have that worked out today, so hopefully I can get this to you guys tonight.

Oct 25, 2010 at 4:58 PM
Oh good to know. I did not want to ask again, i'm still very interested in your code!

Sent from my iPhone
Nov 4, 2010 at 7:22 AM

Has there been any more progress on this work? 

Nov 7, 2010 at 9:13 AM


My name is Mikhail Brinchuk, and I am a developer of DynamicDataDisplay.

I'm searching now a remote job, so if you or your company can offer it to me, I will be very grateful.

If you want to customize DynamicDataDisplay somehow, I can help you to do it.

My CV is here -

Best regards,


Apr 25, 2011 at 6:40 AM

Hello Foxman13, what happened with this? did you managed to upload a working copy? We're very interested in using it.


Thanks in advanced

Juan Campa