I’ve started using the VS 2010 extension XAML Styler and have proposed using it to the team. There is some pushback on the effect of extra whitepace and extra lines on performance (not XAML tree complexity) and XAP sizes. We’ve had the discussion before and I’ve always thought it must be very negligible (due to the compiled nature of XAML), but haven’t tested it closely myself. So does it really matter how clean your XAML is?
Share
Actually yes, the size is increased since the xaml files are stored as resources in the dlls (You can see that with ILSpy). But since xap files are compressed, the size increase is minimal.
I tested this with the default silverlight application that VS creates:
As you can see the increase in size is non-linear (because of compression). Also, I think that 13 bytes for 1000 whitespaces is nothing compared to having a nice, developer-friendly XAML.