Skip to content

App Launch Time Slow:sentrycrashdl_getBinarylmageForHeader #4618

@kingnight

Description

@kingnight

Platform

iOS

Environment

Production

Installed

Manually

Version

8.37.0

Xcode Version

15.1

Did it work on previous versions?

No response

Steps to Reproduce

Image

Info from Xcode Organizer:

  • 100 ms spent in this code path during a 1156 ms launch
  • iPhone 13
  • 18.1.1 (22B91)
        SentrySDK.start { options in
            #if DEBUG
            options.enabled = false
            #else
            options.enabled = true
            #endif
            if AppBundle.isReleasePackage() {
                options.dsn = xxx
            }else{
                options.dsn = xxx
            }
            options.enableNetworkTracking = false
            options.enableCaptureFailedRequests = false
            options.sampleRate = 0.5
            options.tracesSampleRate = 0.3
            options.profilesSampleRate = 0.3
            options.appHangTimeoutInterval = 3
            options.beforeSend = { event in
                if let type = event.exceptions?.first?.type,type == "App Hanging" {
                    if let frames = event.exceptions?.first?.stacktrace?.frames,
                       !frames.isEmpty {
                        for item in frames.reversed() {
                            guard let function = item.function else { continue }
                            if AppDelegate.containsSentryWhiteListedStrings(function){
                                return nil
                            }
                        }
                    }
                }
                return event
            }

            SentrySDK.configureScope { scope in
                if let data:Data = ULog.shared.getActivityLog(){
                    scope.addAttachment(Attachment(data: data, filename: "crash.log"))
                    ULog.shared.removeAllActivityLog()
                }
            }
        }

Expected Result

reduce app launch time

Actual Result

23% slow launch time

Are you willing to submit a PR?

No response

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions