Skip to main content

Microsoft Silverlight

Answered Question Measuring rendering timeRSS Feed

(0)

pjacobi
pjacobi

Member

Member

0 points

2 Posts

Measuring rendering time

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
Sledge70

Contributor

Contributor

5882 points

1,042 Posts

Re: Measuring rendering time

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.

______________________________________________________
Please mark replies as answers if they answered your question...

Flexman on Silverlight

pjacobi
pjacobi

Member

Member

0 points

2 Posts

Re: Measuring rendering time

> 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.

Sledge70
Sledge70

Contributor

Contributor

5882 points

1,042 Posts

Answered Question

Re: Re: Measuring rendering time

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
}

______________________________________________________
Please mark replies as answers if they answered your question...

Flexman on Silverlight
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities