views:

20

answers:

1

Hi,

I'm writing a silverlight app which does some real-time charting. Basically, I just have some polylines overlaid on a canvas. The user can record data for arbitrary amounts of time, and so the width of the canvas is increasing as necessary. Since the canvas is wrapped inside a scrollviewer, it can get quite large. Haven't seen any problems so far, but I haven't implemented the more computationally cumbersome pieces yet, so I'm trying to assess whether this approach is going to cause problems eventually.

Can anyone comment on the efficiency of this approach? What are some tools/methods that I can use to assess efficiency? Any other relevant information (I'm not an SL guru)?

Thanks

+1  A: 

The canvas is just a coordinate-space for the elements that it contains -- there's no underlying bitmap, so increasing its size has no effect on performance or memory consumption.

You need only be concerned with the number of elements in the canvas, and in particular the number (and complexity) of elements in the visible area.

Ben M