Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NativeAOT size and experimentation options #1403

Open
wants to merge 1 commit into
base: staging/AOT
Choose a base branch
from

Conversation

Sergio0694
Copy link
Member

This PR adds some size saving and experimentation options to the authoring sample using NativeAOT. Most importantly, it also sets the options to generate the necessary files to use sizoscope, to investigate and improve the published binary size.

TODO: upload the .mstat and .xml files to the CI.

@Sergio0694 Sergio0694 added authoring Related to authoring feature work trimming AOT labels Dec 1, 2023
<IlcDisableReflection>false</IlcDisableReflection>

<!-- Enable generating files to inspect the binary size with sizoscope (https://github.com/MichalStrehovsky/sizoscope) -->
<IlcGenerateMstatFile>true</IlcGenerateMstatFile>
Copy link
Member Author

@Sergio0694 Sergio0694 Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manodasanW when you have time, could you help updating the CI to upload the MSTAT/.xml files? They will be in the \obj\x64\Release\net8.0-windows10.0.22621\win-x64\native folder for the AuthoringTest project.

We need these 3:

  • AuthoringTest.mstat
  • AuthoringTest.codegen.dgml.xml
  • AuthoringTest.scan.dgml.xml

They might be relatively large (the .xml ones might be ~80 MB each or so), but since it's all plain text we should be able to just make a .zip and they should compress very well. In my sample app, they are ~150 MB in total, but once compressed in a .zip file the result is just ~17 MB, which seems fine? 🙂

@Sergio0694 Sergio0694 force-pushed the user/sergiopedri/naot-winrt-exports branch 2 times, most recently from fa62a4c to f02bf33 Compare January 9, 2024 00:27
@manodasanW manodasanW changed the base branch from user/sergiopedri/naot-winrt-exports to staging/AOT January 12, 2024 20:46
@manodasanW manodasanW closed this Jan 12, 2024
@manodasanW manodasanW reopened this Jan 12, 2024
@Sergio0694 Sergio0694 force-pushed the user/sergiopedri/naot-sizoscope branch from b12a24c to 5754dcb Compare January 13, 2024 01:07
@Sergio0694 Sergio0694 marked this pull request as ready for review January 13, 2024 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AOT authoring Related to authoring feature work trimming
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants