Skip to content

Cold-start regression in v9 caused by Swift runtime metadata / protocol conformance overhead #7896

Description

@minori-fh

Platform

iOS

Environment

Other

Installed

Swift Package Manager

Other Error Monitoring Solution

No

Other Error Monitoring Solution Name

No response

Version

9.2.0 / 9.5.0

Xcode Version

16.x

Did it work on previous versions?

No response

Steps to Reproduce

  1. Integrate sentry-cocoa v8.58.2 into a large Swift iOS app
  2. Measure cold-start launch time with Instruments / Headspin
  3. Upgrade to sentry-cocoa v9.x
  4. Repeat cold-start measurements
  5. Compare swift_conformsToProtocol samples and startup duration

Expected Result

Cold-start performance remains similar between v8 and v9.

Actual Result

Upgrading to v9 introduces a 40–65% cold-start regression.
swift_conformsToProtocol increases from ~0.2% → ~11.6% during launch, correlated with larger __swift5_proto / Swift metadata sections and hot-path use of String(describing:).

Are you willing to submit a PR?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions