twilio / twilio-voice-ios

Programmable Voice SDK by Twilio
https://www.twilio.com/voice
38 stars 14 forks source link

`+[TwilioVoiceSDK load]` contributes to slow app launch time #130

Open ccrazy88 opened 2 months ago

ccrazy88 commented 2 months ago

Description

According to Xcode's organizer, 20% of our app's slow launch time is caused by +[TwilioVoiceSDK load].

Trace

Is it possible to move this work outside of the app launch path, closer to when our app starts to use the voice SDK (e.g., placing a call)? For our app, the voice SDK is used for customer support and is thus inactive most of the time, so avoiding any launch time penalty would be especially beneficial to us. Thank you!

Expected Behavior

SDK doesn't affect app startup time.

Versions

Voice iOS SDK

6.11.2 via Swift Package Manager

Xcode

15.4

iOS Version

N/A

iOS Device

N/A

bobiechen-twilio commented 2 months ago

Thanks for the feedback @ccrazy88 We will take a look and keep you updated.

ccrazy88 commented 1 month ago

Thank you! Do you have anything to share at this point?

bobiechen-twilio commented 1 month ago

Hi @ccrazy88

While we are still working on instrumenting and addressing the issue, is it possible for you to provide the original launch time report or a redacted version but with more details, in case there are also some other initialization tasks introduced by the SDK during launch?

Thanks.

ccrazy88 commented 1 month ago

Is there a place more private than this issue where I'd be able to send more details? For what it's worth, every other entry in the report is from our own code 😂. We currently don't see anything else from Twilio. In the most recent version of our app, which is the first version of the app built with Xcode 16, Twilio represents 26% of our "slow launch time."

bobiechen-twilio commented 3 weeks ago

Hi @ccrazy88 Sorry I was not able to get back to you sooner, but if it's okay please provide extra information to bchen [at] twilio.com. We have also done instrumenting with the SDK but from what I can see the functions shown in the screenshot of the original description are only taking a fraction of CPU time according to Instruments, but perhaps I am missing something and hopefully the launch time report from you can help solve the missing part. Thanks.