Skip to content

Look into potentially improvable ctor invocation in the static registrar #26836

Description

@rolfbjarne

Ref: #26835 (comment)

🤖 ⚠️ Performance — Annotating T with all public and non-public constructors causes the trimmer to retain every constructor—and their transitive dependencies—for every type used by a constructor trampoline, even though the emitted trampoline directly calls only one constructor. The updated baselines already show unrelated overloads becoming rooted (UIApplicationDelegate(NSObjectFlag) and ActionDispatcher(EventHandler), including selector fields), while the iOS NativeAOT executable grows by 15,624 bytes. Please replace this broad preservation with a narrower NativeAOT-safe strategy so constructor-heavy user types do not inflate trimmed apps.

Activity

  1. added this to the .NET 12 milestone on Oct 2, 2026
  2. added
    performance
    on Oct 2, 2026
  3. added theissue type on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    performance

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions