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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Tests/AuthoringTest/AuthoringTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Platforms>x64;x86</Platforms>
<CsWinRTComponent>true</CsWinRTComponent>
<IsTrimmable>true</IsTrimmable>
<IsAotCompatible>true</IsAotCompatible>
<!-- CsWinRTEnableLogging helps to diagnose generation issues -->
<!-- <CsWinRTEnableLogging>true</CsWinRTEnableLogging> -->
<!--<CsWinRTKeepGeneratedSources>true</CsWinRTKeepGeneratedSources>-->
Expand Down
16 changes: 14 additions & 2 deletions src/Tests/AuthoringTest/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,22 @@
it we can also further validate that the self-contained authoring scenario works correctly
-->
<PropertyGroup Condition="'$(Configuration)' == 'Release' and '$(Platform)' == 'x64'">
<IsAotCompatible>true</IsAotCompatible>
<PublishAot>true</PublishAot>
<NativeLib>Shared</NativeLib>
<SelfContained>true</SelfContained>

<!-- General .NET and NativeAOT size saving options -->
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<InvariantGlobalization>true</InvariantGlobalization>
<OptimizationPreference>Size</OptimizationPreference>
<StackTraceSupport>false</StackTraceSupport>

<!-- Unsupported size saving options, can be experimented with to investigate binary size -->
<IlcFoldIdenticalMethodBodies>false</IlcFoldIdenticalMethodBodies>
<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? 🙂

<IlcGenerateDgmlFile>true</IlcGenerateDgmlFile>
</PropertyGroup>

</Project>
Loading