Tealium / tealium-swift

Tealium Swift Integration Library
Other
41 stars 40 forks source link

[TEALIUM SWIFT BUG]: Tracking location block UI 1-2s #170

Closed tynewstar2011 closed 3 years ago

tynewstar2011 commented 3 years ago

Your Environment Fill out as appropriate. iOS Version(s) [e.g. 13.6]: Xcode version [Xcode> About Xcode e.g. 12.1 (12A7403)]: Swift version [e.g. 5.0]: Tealium Swift library version [e.g. 2.2.1]: Dependency manager [CocoaPods]: Dependency manager version: 1.9.1 Describe the bug When i track the location service, it will block ui 1-2 seconds.

Does a workaround exist? Remove the location service tracking.

To Reproduce

  1. tracking location service config.collectors = [ Collectors.Location, // this will block ui. ]
  2. start tracking
  3. the ui would block 1-2 seconds ...

Expected behavior It should not block UI.

Screenshots

Screen Shot 2021-01-14 at 15 25 54

Additional context it should not load the string data in main thread.

craigrouse commented 3 years ago

@tynewstar2011 Sorry you're having this issue, and thanks for the bug report. We will take a look at this right away and keep you updated.

christinasund commented 3 years ago

@tynewstar2011 Unfortunately, I haven't been able to reproduce the issue you are seeing. Can you please send an email to support@tealium.com with the following details:

  1. A link to this issue
  2. The Tealium account and profile you are using in this particular app
  3. The value of the config.geofenceUrl

Thanks!

tynewstar2011 commented 3 years ago

@christinasund Sorry for the postponed reply. I have sent the email.

Thanks!

craigrouse commented 3 years ago

Thanks @tynewstar2011. We'll take a look and get back to you ASAP.

christinasund commented 3 years ago

@tynewstar2011 Thank you for sending that over. We have been testing the sample and are still having trouble reproducing the UI freeze. I have even configured the app for geofences and to request location authorization and everything works fine. I have also installed Tealium with the location module in the FlappyBird swift app to see if I could see the UI freeze in a larger and more complex app, and was not successful in reproducing the problem.

Could you send over screenshots of your actual Tealium Helper or Analytics Manager where you are initializing Tealium?

Thanks

tynewstar2011 commented 3 years ago

@christinasund , I have attached the source code in previous email. you can run and scroll the data quickly to reproduce it.

christinasund commented 3 years ago

Thanks @tynewstar2011, I have scrolled quickly on the simulator for both iOS 14.4 and 13.5 and also two different devices (iPhone 11 and iPhone SE). I am still unable to reproduce the 1-2 second freeze you describe in your initial post.

However, I do notice maybe a 200 ms delay in the table view scroll because of this block in the AppDelegate:

  // delay start tealium 3s to see the screen fronzen.
  let deadlineTime = DispatchTime.now() + .seconds(3)
  DispatchQueue.main.asyncAfter(deadline: deadlineTime) {
      _ = TealiumHelper.shared
  }

We do as much as we can on the background thread, but it would be expected to see a very slight delay when adding our init to the main thread like this even if it is asynchronous.

For this particular sample app, are you seeing a 1-2 second freeze? Have you tried on a device and/or different machines? If so, let me know and we can set up a zoom meeting. Thanks for your patience on this.

craigrouse commented 3 years ago

@tynewstar2011 do our comments above help at all? Thank you.

craigrouse commented 3 years ago

Closing as unable to reproduce and no further information provided. Please feel free to reopen if you're still experiencing this issue.