sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

Use cached methods SentryDebugImageProvider of the Cocoa SDK

Open philipphofmann opened this issue 1 year ago • 3 comments

Description

Replace https://github.com/getsentry/sentry-react-native/blob/a3712749433c1ad536f4faf9a94520fabc9c791e/ios/RNSentry.mm#L323

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

philipphofmann avatar Oct 14 '24 12:10 philipphofmann

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.

https://github.com/getsentry/sentry-react-native/blob/a989877aa578d652ec0683764d802bb6bb6cbd2e/packages/core/ios/RNSentry.mm#L323

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

antonis avatar Oct 21 '24 08:10 antonis

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

krystofwoldrich avatar Oct 21 '24 09:10 krystofwoldrich

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

Opened https://github.com/getsentry/sentry-cocoa/pull/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.

antonis avatar Oct 21 '24 14:10 antonis