Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Measuring rendering time
3 replies. Latest Post by Sledge70 on September 22, 2009.
(0)
pjacobi
Member
0 points
2 Posts
09-22-2009 7:28 AM |
I'm porting a desktop application to Silverlight which displays a lot of vector data dynamically. Think charts but with so many points, that the usually charting tools have too much per point overhead.
I need the information how much time it needs to display the data on the screen, both during development for optimization, and during runtime to let the application adapt (adjust detail level to make the display not unbearable slow).
But I've found so far no good way to measure the rendering time! (OTOH I just started Silverlight, so I might have missed an obvious solution).
What's not an solution, is observing the time it needs to build the polylines (always fast enough) or adding them to the canvas (doesn't block, returns almost immediately). So is there a "rendering complete event" or something like that? Or is this work to done using the profiler? But how do I adapt at runtime to the different speed of systems.
Sledge70
Contributor
5882 points
1,042 Posts
09-22-2009 7:53 AM |
Have a look at the loaded event.
Maybe you could subscribe to this for every nth element you are creating to get an idea of load times etc.
09-22-2009 10:40 AM |
> Have a look at the loaded event.
Didn't work either. Always always reports "Loaded" zero msecs after adding to the canvas, even when there is a huge, visible delay in the actual display.
09-22-2009 10:47 AM |
How about pushing an event onto the UIThread in your initialise which should be queued and fired once your rendering has completed as this is happening on the UI Thread as well.
i.e.
InitialiseComponent();Dispatcher.BeginInvoke(MyInitialised);
private voite MyInitialised(){ Rendering should be completed now}