-
-
Notifications
You must be signed in to change notification settings - Fork 316
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
impr: Speed up getBinaryImages #4435
Conversation
Add two new internal methods getDebugImagesFromCacheForFrames getDebugImagesFromCacheFrames to the SentryDebugImageProvider which use the significantly faster SentryBinaryImageCache. Fixes GH-4399
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4435 +/- ##
=============================================
+ Coverage 91.319% 91.333% +0.013%
=============================================
Files 610 610
Lines 49755 49926 +171
Branches 17928 18037 +109
=============================================
+ Hits 45436 45599 +163
- Misses 4227 4234 +7
- Partials 92 93 +1
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
7cd187e | 1239.02 ms | 1261.42 ms | 22.40 ms |
9fa5d27 | 1230.65 ms | 1255.08 ms | 24.43 ms |
f1ed6f8 | 1210.94 ms | 1230.78 ms | 19.84 ms |
5b888cb | 1218.28 ms | 1244.65 ms | 26.37 ms |
8aec30e | 1235.73 ms | 1255.87 ms | 20.14 ms |
326b7eb | 1223.41 ms | 1235.66 ms | 12.25 ms |
1c0e955 | 1275.71 ms | 1305.69 ms | 29.98 ms |
5e769dd | 1216.24 ms | 1245.74 ms | 29.50 ms |
282cc99 | 1232.59 ms | 1245.88 ms | 13.29 ms |
8f397a7 | 1196.55 ms | 1226.82 ms | 30.27 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
7cd187e | 20.76 KiB | 401.65 KiB | 380.89 KiB |
9fa5d27 | 20.76 KiB | 393.37 KiB | 372.61 KiB |
f1ed6f8 | 21.58 KiB | 683.51 KiB | 661.93 KiB |
5b888cb | 21.58 KiB | 654.67 KiB | 633.09 KiB |
8aec30e | 21.58 KiB | 616.75 KiB | 595.17 KiB |
326b7eb | 20.76 KiB | 432.31 KiB | 411.55 KiB |
1c0e955 | 21.58 KiB | 424.28 KiB | 402.70 KiB |
5e769dd | 21.58 KiB | 572.21 KiB | 550.62 KiB |
282cc99 | 22.85 KiB | 414.09 KiB | 391.24 KiB |
8f397a7 | 20.76 KiB | 420.55 KiB | 399.79 KiB |
Previous results on branch: impr/speed-up-get-debug-images
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5096089 | 1214.55 ms | 1239.74 ms | 25.19 ms |
cb282da | 1237.39 ms | 1259.47 ms | 22.08 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5096089 | 21.58 KiB | 707.35 KiB | 685.77 KiB |
cb282da | 21.58 KiB | 707.35 KiB | 685.77 KiB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
📜 Description
Add two new internal methods
getDebugImagesFromCacheForFrames
andgetDebugImagesFromCacheForThreads
to theSentryDebugImageProvider
, which use the significantly fasterSentryBinaryImageCache
.sentry-cocoa/Sources/Sentry/include/HybridPublic/SentryBinaryImageCache.h
Lines 11 to 16 in 5a6e387
💡 Motivation and Context
Fixes GH-4399
💚 How did you test it?
Will test it with TestFlight builds.
Main Branch
Event in Sentry
Debug Meta Event JSON
Transaction in Sentry
Transaction Debug Meta JSON
Feature Branch
Event in Sentry
Debug Meta Event JSON
Transaction in Sentry
Transaction Debug Meta JSON
Profiles
Main Branch
Feature Branch
The profile of the feature branch doesn't show anything suspicious for NSScanner, which the
sentry_UInt64ForHexAddress
uses. The profile on the main branch highlights thatsentrycrashdl_getBinaryImageForHeader
has 2.00 Mc and weight of 0.4%. ThegetDebugImagesForThreads
has a weight of 2,0% on the main branch, but thegetDebugImagesFromCacheForThreads
has only 0.3% weight. This proves that the new implementation ofgetDebugImagesFromCacheForThreads
should be significantly faster.📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps