NativeAOT currently exposes the undocumented 'IlcDehydrate' option (enabled by default), which reduces binary size by dehydrating pointer values in the Native AOT runtime data structures, and then hydrates them at startup. This trades binary size for perf and memory use. We experimented with disabling this setting in the Microsoft Store, and after profiling we had some positive results that make the tradeoff worth it for us:
- 20-30ms startup perf improvement
- ~50 MB memory use reduction
Would it be possible to expose this as a documented option? Probably with a different name, of course.
Ideally, this should be a standalone option (like it is now), and not just implied by something else (eg. 'OptimizationPreference').
cc. @MichalStrehovsky
NativeAOT currently exposes the undocumented 'IlcDehydrate' option (enabled by default), which reduces binary size by dehydrating pointer values in the Native AOT runtime data structures, and then hydrates them at startup. This trades binary size for perf and memory use. We experimented with disabling this setting in the Microsoft Store, and after profiling we had some positive results that make the tradeoff worth it for us:
Would it be possible to expose this as a documented option? Probably with a different name, of course.
Ideally, this should be a standalone option (like it is now), and not just implied by something else (eg. 'OptimizationPreference').
cc. @MichalStrehovsky