title: WPF 4.0 EdgeMode.Aliased drawing inexplicably slow to display on canvas
body: <p>I'm drawing some vector data, slightly under 9000 polygon objects, using FrameworkElement:DrawingVisual which in turn is a child of a Canvas object. My tree of objects would look something like this:</p>
  
  <pre><code>WPF Window
  -Canvas
  --FrameworkElement
  ---DrawingVisual -&gt; DrawingContext.DrawGeometry
  </code></pre>
  
  <p>So far so good. I'm timing all the rendering methods and it is pretty much as expected, 0.32 seconds for the DrawingContext to do its stuff and 0.5 seconds total. With EdgeMode set to default (anti-aliased) the completed drawing appears on my canvas barely half a second later.</p>
  
  <p>However, because I need all lines to be aliased I use RenderingOptions.SetEdgeMode to EdgeMode.Aliased on the canvas object. </p>
  
  <p>After doing this there is no discernible difference in rendering time, 0.5 seconds total time. But - the completed drawing now takes over 4 seconds before it appears in my window. This compared to under 0.5 seconds for the anti-aliased version. The only difference is this single line of code:</p>
  
  <pre><code> RenderOptions.SetEdgeMode(myCanvas, EdgeMode.Aliased);
  </code></pre>
  
  <p>If I resize the window same thing happens, it takes much longer for the aliased version to resize compared to the anti-aliased one. Obviously, in this case my drawing code isn't even invoked so the problem must lie elsewhere.</p>
  
  <p>It seems that something external to my code is slowing things down drastically when in aliased rendering mode, quite opposite of what I would have expected. So what am I missing here? </p>