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

Use cached methods SentryDebugImageProvider of the Cocoa SDK #4169

Open
philipphofmann opened this issue Oct 14, 2024 · 3 comments · May be fixed by #4194
Open

Use cached methods SentryDebugImageProvider of the Cocoa SDK #4169

philipphofmann opened this issue Oct 14, 2024 · 3 comments · May be fixed by #4194

Comments

@philipphofmann
Copy link
Member

philipphofmann commented Oct 14, 2024

Description

Replace

NSArray<SentryDebugMeta *> *debugMetaImages = [[[SentryDependencyContainer sharedInstance] debugImageProvider] getDebugImagesForAddresses:imagesAddrToRetrieveDebugMetaImages isCrash:false];

with either SentryDebugImageProvider.getDebugImagesFromCacheForFrames or SentryDebugImageProvider.getDebugImagesFromCacheForThreads added in getsentry/sentry-cocoa#4435, which will most likely ship with Cocoa 8.39.0. getDebugImagesForAddresses is slow and caused AppHangs on iOS; see getsentry/sentry-cocoa#4399.

@philipphofmann philipphofmann changed the title Use https://github.com/getsentry/sentry-cocoa/pull/4435/commits/641c1e1ea3bbe3d670b68ddad9fb096626144e51 Use cached methods SentryDebugImageProvider of the Cocoa SDK Oct 14, 2024
@antonis
Copy link
Collaborator

antonis commented Oct 21, 2024

Hey @philipphofmann, @krystofwoldrich 👋
Following up on the conversation here, would it make sense to also expose the getDebugImagesForImageAddressesFromCache in the SentryDebugImageProvider+HybridSDKs.h?
The method is used in the getDebugImagesFromCacheForFrames and getDebugImagesFromCacheForThreads implementation that are exposed and could make the RN side migration more straightforward.

NSArray<SentryDebugMeta *> *debugMetaImages = [[[SentryDependencyContainer sharedInstance] debugImageProvider] getDebugImagesForAddresses:imagesAddrToRetrieveDebugMetaImages isCrash:false];

I can open a PR on sentry-cocoa if you agree or use the private method.

@antonis antonis linked a pull request Oct 21, 2024 that will close this issue
9 tasks
@krystofwoldrich
Copy link
Member

Yes, let's add getDebugImagesForImageAddressesFromCache to the hybrid SDKs header.

@antonis
Copy link
Collaborator

antonis commented Oct 21, 2024

Yes, let's add getDebugImagesForImageAddressesFromCache to the hybrid SDKs header.

Opened getsentry/sentry-cocoa#4460 and I plan to update my RN PR that currently uses the private method as soon as the next sentry-cocoa version is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants