Skip to content

Add MetadataOptimizerStep #1405

@marek-safar

Description

@marek-safar

We need to port existing Xamarin metadata optimizer to help us further with size reductions. ILLinker has now more information available about reflection scenario which could allow us to be more aggressive.

Original Step -- https://github.com/xamarin/xamarin-macios/blob/master/tools/linker/MonoTouch.Tuner/MetadataReducerSubStep.cs?rgh-link-date=2019-09-18T08%3A25%3A52Z

Proposed improvements

  • Remove fields names. This is especially valuable for C# compiler generated names which are unnecessary long (e.g. .field static assembly initonly class '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=256' '21244F82B210125632917591768F6BF22EB6861F80C6C25A25BD26DFB580EA7B' and similar), more info at Consider stripping names of fields that don't matter #1282
  • Apply StackTraceHiddenAttribute more aggressive in libraries and strip all metadata for such methods (for example for System.SR methods)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions