You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Segment SDK is distributed as a source via SPM.
Upon compilation, a single method func application(_ application: UIApplication?, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) takes irrationally long time for compiling.
To Reproduce
Steps to reproduce the behavior:
Compile iOSLifecycleEvents.swift with the following flags:
for target in package.targets {
target.swiftSettings = target.swiftSettings ??[]
target.swiftSettings?.append(.unsafeFlags(["-Xfrontend","-warn-long-function-bodies=30","-Xfrontend","-warn-long-expression-type-checking=30"]))}
Observe Xcode warnings
Expected behavior
There should be no longer than usual 0.3 - 0.5 ms of compiling iOSLifecycleEvents.application(didFinishLaunchingWithOptions:) on M1 family SoC.
Screenshots
Platform (please complete the following information):
art-divin
changed the title
iOSLifecycleEvents.application(didFinishLaunchingWithOptions:) is Compiled for More than 691 ms
iOSLifecycleEvents.application(didFinishLaunchingWithOptions:) is Compiled for More than 400 ms
May 4, 2024
Describe the bug
Segment SDK is distributed as a source via SPM.
Upon compilation, a single method
func application(_ application: UIApplication?, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?)
takes irrationally long time for compiling.To Reproduce
Steps to reproduce the behavior:
iOSLifecycleEvents.swift
with the following flags:Expected behavior
There should be no longer than usual 0.3 - 0.5 ms of compiling
iOSLifecycleEvents.application(didFinishLaunchingWithOptions:)
on M1 family SoC.Screenshots
Platform (please complete the following information):
Additional context
Using https://github.com/qonto/SwiftCompilationTimingParser it is easier to address such issues, but the approach described with Xcode also works.
The text was updated successfully, but these errors were encountered: