binary size of metro apps and components seems to big

    General discussion

  • Hello,

    I just gave WinRT a try and compiled a sample RTComponent and Grid Metro App.

    In Release builds the app is ~400k (with all items removed from the collection in the datasource, since they would naturally come from external source anyway).
    This seems a bit high for what the app actually does. And also, given that most functionality should be pulled from WinRT dlls I wonder what causes the code bloat. I would like to think that the xaml gets translated into some kind of binary format and packed.

    The RTCompoment.dll also is quite heavy in size with about  20k doing nothing really usefull at all.

    I can compile a normal COM dll using the HILO (http://msdn.microsoft.com/en-us/library/ff795785.aspx) approach in 8k.

    Any thoughts on this issue?




    Friday, November 11, 2011 12:21 AM

All replies

  • Thank you for the feedback.

    We are aware of this issue and this is expected for the Developer Preview release.  We are evaluating ways to improve this.

    Essentially what you are seeing is that C++/CX introduces a very large amount of symbols to ensure that applications can talk across interop boundaries with C++ in a way that feels seamless for the languages.  COM also introduces some overhead but right now it is much less than what we are introducing.  Additionally all metadata that a DLL/EXE uses introduces additional symbols into the application to talk with the exports from that DLL.  Lastly, the XAML generates quite a bit of code itself.

    Alex Thaman
    Senior Test Lead
    C++ team

    Friday, November 11, 2011 7:48 PM