Drawing Performance vs Modification Performance

Jun 11, 2010 at 4:57 PM
Edited Jun 11, 2010 at 4:58 PM

Hello,

I have noticed that when you first draw the shapes the performance can get very iffy, especially whenever you zoom out the canvas. However moving those same shapes, or moving the vertices / lines in those shapes has no noticable performance hit at all.

IE.

1. Zoom canvas out some and draw a polygon... rendering speed while drawing is vastly reduced.

2. Close the polygon.

3. Select a line or point in the polygon and adjust it, no rendering speed isssues at all.

4. Select the entire polygon and move it on the canvas, again, no rendering speed issues at all.

Any insight into what might be causing this initial and in many cases huge performance hit while actually drawing the shape? Even a simple line with nothing else on the canvas suffers this hit, yet moving the endpoint of the line once it is recreated (which should be the same process as drawing the line to begin with as the moved line updates while you drag the endpoint around) has no noticeable hit at all. Any info leading to understanding would be greatly appreciated.

Thanks in advance!

Developer
Jun 24, 2010 at 3:06 AM

I've followed the four steps and don't experience the performance problem.  Perhaps someone else has the same problem and can help you diagnose it.

Good luck,

David

Coordinator
Jun 30, 2010 at 6:45 AM

I think I've seen this but I haven't investigated yet. It is possible that we're doing extra work in MouseMove when creating a shape, I'm not sure.

I think I've heard somewhere that WPF/Silverlight is optimized when redrawing a shape, it will be careful to not redraw the entire screen.

I'll take a look when I have some time.

Thanks for reporting this!

Kirill