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?
pushback on the effect of extra whitepace and extra lines on performance
Reads as "we don't like change so we'll think up and excuse not to". The answer to your actual question is its so negligable even the word "negligable" seems to heavy to describe how small it is.
However, I really doubt your other team members don't already know that. So you are probably flogging a dead horse anyway. (Sounds like a good subject for a Dilbert)
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:
- Original size: 3694 bytes
- Added 100 whitespace characters: 3699 bytes
- Added 900 whitespace characters more: 3707 bytes
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.
精彩评论