This project is read-only.

Drawing Performance vs Modification Performance

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


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.


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!

Jun 24, 2010 at 4: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,


Jun 30, 2010 at 7: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!