Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftUI serious hangs #140

Closed
DwayneCoussement opened this issue May 7, 2024 · 11 comments
Closed

SwiftUI serious hangs #140

DwayneCoussement opened this issue May 7, 2024 · 11 comments
Labels
bug Something isn't working iOS Platform/Framework

Comments

@DwayneCoussement
Copy link

Platform + Version
iOS 17

SDK Version
3.2.0

Framework
Native, SwiftUI

Describe the bug
Have a bit of a more complex SwiftUI view, notice that the Pendo SDK is slowing down the whole application (serious hangs if you attach it to the Time profiler)

To Reproduce
Not sure what's the easiest way to reproduce, but having Pendo active and a bit of a more complex view (a gridview) that does some updates makes Pendo using a lot of time

Expected behavior
The performance is the same with the Pendo SDK, as it is without it, no serious hangs.

Additional context
Untitled

@MikePendo
Copy link
Contributor

@DwayneCoussement
Yes we are aware of it and fixing it now hopefully will release HF by end of the week

@MikePendo MikePendo added iOS Platform/Framework bug Something isn't working labels May 7, 2024
@0xkuj
Copy link
Contributor

0xkuj commented May 12, 2024

@DwayneCoussement HF version 3.2.1 was released. please install and reopen this ticket if needed!

@0xkuj 0xkuj closed this as completed May 12, 2024
@0xkuj
Copy link
Contributor

0xkuj commented May 12, 2024

in addition to that is will be highly recommended to change the integration with an addition flag as below:

let options = PendoOptions()
options.configs = ["enableTextCollectionSwiftUI":false]
PendoManager.shared().setup(prodAppKey,with: options)

this flag is meant to reduce the texts collection via reflection and base text collection on accessibility elements only.

this was done in our latest 3.2.1 HF fix, please try upgrading and let us know with your results.

@DwayneCoussement
Copy link
Author

While it seriously improved a lot, it's still too slow, my UI still has hangs that are not there when I remove Pendo. I applied the options mentioned above; but I do hope that more improvements are coming. What I know see is that PDNHookFunctions is the cause, and not PDNScreenManager anymore.

@MikePendo
Copy link
Contributor

@DwayneCoussement
PDNHookFunctions its only a hook and doesnt (didnt) has any heavy processing. It forward the call to its flow after dispatching analytics in another thread.
Can you please expand the trace of PDNHookFunctions and see who is responsible for the heavy weight?

@MikePendo
Copy link
Contributor

In general our main concern (at least the one we noticed was during page change). and that what we attempt to resolve ( the PDNScreenManager). The Hook never caused a performance issue for us. BUT please share your findings and we will try to see what's going on

@DwayneCoussement
Copy link
Author

Screenshot 2024-05-22 at 10 00 59 It seems to be hanging here; this is on a SwiftUI grid view with quite a lot of items. Each item has an image that will check from cache, and if it's not in the cache get it from the network and put it in the cache. Disabling Pendo = no UI hangs, Enabling Pendo = UI hangs. This also gets triggered during scrolling of the page.

@MikePendo
Copy link
Contributor

@DwayneCoussement
Can you please expand the call u shared? we need to see what is causing the hang.
The image is only a stack of the calls.
(the part u shared is just a swizzle of click Pendo shouldn't really do any heavy job on in that function, we need to see what is get called after that function)

@MikePendo
Copy link
Contributor

MikePendo commented May 23, 2024

or if your app is available on App Store we can check it on our own. (we might need creds if we dont have an option to login, and access to that specific ui content)

@Szpyrol
Copy link

Szpyrol commented Dec 30, 2024

Screenshot 2024-05-22 at 10 00 59

It seems to be hanging here; this is on a SwiftUI grid view with quite a lot of items. Each item has an image that will check from cache, and if it's not in the cache get it from the network and put it in the cache. Disabling Pendo = no UI hangs, Enabling Pendo = UI hangs. This also gets triggered during scrolling of the page.

We struggle with just the same problem now. For some reason Pendo crashes when it tries to access CGPoint with a negative value - during orientation change most probably. @MikePendo - was it raised since May maybe?

@MikePendo
Copy link
Contributor

@Szpyrol
it might hang somewhere inside that method the method itself doesnt really cause it. (definitely should not crash)

  1. Any chance we can reproduce it on our side would it be able for you to add as test flight user so we will be able to work on it on our side, if you app is available on App Store we can use it also?
  2. any chance you can apply the following (to avoid some scanning properties):
let options = PendoOptions()
options.configs = ["enableTextCollectionSwiftUI":false]
PendoManager.shared().setup(prodAppKey,with: options)

#142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working iOS Platform/Framework
Projects
None yet
Development

No branches or pull requests

4 participants