views:

20

answers:

1

As far as rendering performance is concerned, has a Rectangle with a size of 5000x5000 different performance characteristics than a Rectangle with a size of 5x5 and a ScaleTransform (LayoutTransform) of 1000?

+2  A: 

The rendering performance difference is negligible:

  • The layout pass is very slightly slower when a LayoutTransform is present, since it must be propagated down the rendering tree, and
  • The coordinate transforms are very slightly slower when a LayoutTransform is present, since they must apply the LayoutTransform to the four corners of the rectange, BUT
  • When it comes to actually drawing pixels onto the screen there is no difference at all.

Drawing pixels is usually most of the work.

Unless you are drawing very large numbers of very small rectangles, you won't notice the difference.

Ray Burns