Tealium / tealium-swift

Tealium Swift Integration Library
Other
41 stars 40 forks source link

[TEALIUM SWIFT BUG]: TealiumDelegateProxy.setup(context:) Slow Launch Times #337

Open RGG-jayoung opened 2 weeks ago

RGG-jayoung commented 2 weeks ago

Your Environment Fill out as appropriate. iOS Version(s) [e.g. 12.1]: iOS 17 (all versions) Xcode version [Xcode> About Xcode e.g. 10.1 (10B61)]: Xcode 15.3, Xcode 15.4 Swift version [e.g. 4.2]: Swift Version 5.10 Tealium Swift library version [e.g. 1.6.7]: 2.14.0 Dependency manager [None/Carthage/CocoaPods]: Swift Package Manager Dependency manager version:

Describe the bug Approximately 20-45% of our slow launch time occurrences across many app versions reference TealiumDelegateProxy.setup(context:). The property isAutotrackingDeepLinkEnabled appears consistently in reports whenever Tealium is mentioned in for slow launch times.

image Tealium Slow Launch Overview

Does a workaround exist? If applicable, describe the workaround here.

There is no known workaround.

To Reproduce Steps to reproduce the behavior. If applicable, please attach sample code showing how to reproduce the bug. Remember to keep your Tealium account details private, and only post generic code. Additional code or crash logs may be shared with us privately on support@tealium.com.

  1. When profiling in Xcode, choose launch times template.
  2. After measuring multiple passes, filter to find Tealium's portion of the launch time. ...

Expected behavior A clear and concise description of what you expected to happen.

Reduce launch time overhead for Tealium.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

craigrouse commented 2 weeks ago

@RGG-jayoung Sorry you're seeing this. Unfortunately, I think it's the nature of what we're doing there that will inevitably cause some delays. If you don't want this functionality, you can disable it by adding an Info.plist property of TealiumAutotrackingDeepLinkEnabled = NO, but be aware that you will lose the ability for Tealium to auto track deep links, which will also break the QR code debugging functionality if you're using that. The solution would be to add your own call to tealium.handleDeepLink whenever your app receives a deep link. Please try this and let us know how you get on. We'll also look to see if there are any efficiency improvements we can make in the delegate proxy.

craigrouse commented 2 weeks ago

@RGG-jayoung upon further investigation, we've identified a possible optimization that might improve the speed of reading from the Info.plist entries, which seems to be the main culprit. We'll get back to you when we've done some more research.

RGG-jayoung commented 2 weeks ago

@craigrouse that's great news on a potential optimization. I'm discussing side effects of TealiumAutotrackingDeepLinkEnabled = NO with the team. Looking forward to your findings.

Enricoza commented 2 weeks ago

Hi @RGG-jayoung we are trying to test our improvements but it would be very helpful if you could share with us your Info.plist and if you have localization strings for that plist. In order to send it to us privately you can attach it into a ticket that you can open on our portal, specifying that it's related to this issue. Thanks for the cooperation.