Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Trace slows app launch time when using Xcode SPM #82

@mackoj

Description

@mackoj

Your environment:

  • Xcode version: 12.5.1
  • Trace SDK version: 1.7.36
  • Installation method: SPM
  • iOS Version: 14.7.1
  • test device: iPhone 12

Steps to reproduce:

I did notice a slowdown of our app since I added the Trace SDK.

I used DYLD_PRINT_STATISTICS(App Launch Time: 7 tips to increase performance) in order to print information about the app start.

The name of our app binary is Sambot.

The difference is huge between when I have the Trace SDK in the app and when I don't have it.

with Trace SDK

Total pre-main time: 461.11 milliseconds (100.0%)
         dylib loading time: 148.26 milliseconds (32.1%)
        rebase/binding time:  90.55 milliseconds (19.6%)
            ObjC setup time:   3.49 milliseconds (0.7%)
           initializer time: 218.80 milliseconds (47.4%)
           slowest intializers :
    libMainThreadChecker.dylib :  16.93 milliseconds (3.6%)
                        Sambot : 374.92 milliseconds (81.3%)

without Trace SDK

Total pre-main time: 286.37 milliseconds (100.0%)
         dylib loading time: 158.84 milliseconds (55.4%)
        rebase/binding time:  30.61 milliseconds (10.6%)
            ObjC setup time:  11.49 milliseconds (4.0%)
           initializer time:  85.41 milliseconds (29.8%)
           slowest intializers :
             libSystem.B.dylib :  12.93 milliseconds (4.5%)
   libBacktraceRecording.dylib :   9.03 milliseconds (3.1%)
    libMainThreadChecker.dylib :  36.37 milliseconds (12.7%)
                        Sambot :  21.25 milliseconds (7.4%)
env name time(ms)
with Trace SDK pre-main 461.11
with Trace SDK dylib loading 148.26
with Trace SDK rebase/binding 90.55
with Trace SDK ObjC setup 3.49
with Trace SDK initializer 218.80
with Trace SDK libMainThreadChecker.dylib 16.93
with Trace SDK Sambot 374.92
without Trace SDK pre-main 286.37
without Trace SDK dylib loading 158.84
without Trace SDK rebase/binding 30.61
without Trace SDK ObjC setup 11.49
without Trace SDK initializer 85.41
without Trace SDK libSystem.B.dylib 12.93
without Trace SDK libBacktraceRecording.dylib 9.03
without Trace SDK libMainThreadChecker.dylib 36.37
without Trace SDK Sambot 21.25

Can you improve it ?

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions