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

impr: Speed up getBinaryImages V2 #4539

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Nov 15, 2024

📜 Description

Follow up on GH-4435. Use binary image cache to get debug meta when finishing the tracer and capturing profiles. Mark all methods to get debug meta not using the cache as deprecated to ensure we migrate to the methods using the cache.

💡 Motivation and Context

Our customer reported that even with GH-4435, they still see app hangs.

💚 How did you test it?

Unit tests, still need to test it with a testflight build to check profiles and transactions.

📝 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Follow up on GH-4435. Use binary image cache to get debug meta when
finishing the tracer and capturing profiles. Mark all methods to get
debug meta not using the cache as deprecated to ensure we migrate to the
methods using the cache.
Copy link
Contributor

@brustolin brustolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 96.47059% with 6 lines in your changes missing coverage. Please review.

Project coverage is 91.559%. Comparing base (37fd7a2) to head (d79d53c).

Files with missing lines Patch % Lines
SentryTestUtils/TestDebugImageProvider.swift 72.727% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4539       +/-   ##
=============================================
- Coverage   91.560%   91.559%   -0.001%     
=============================================
  Files          614       614               
  Lines        69777     69923      +146     
  Branches     24880     24976       +96     
=============================================
+ Hits         63888     64021      +133     
- Misses        5797      5809       +12     
- Partials        92        93        +1     
Files with missing lines Coverage Δ
Sources/Sentry/PrivateSentrySDKOnly.mm 89.285% <100.000%> (+0.166%) ⬆️
...es/Sentry/Profiling/SentryProfilerSerialization.mm 91.538% <100.000%> (+0.065%) ⬆️
Sources/Sentry/SentryBinaryImageCache.m 100.000% <100.000%> (ø)
Sources/Sentry/SentryDebugImageProvider.m 88.000% <100.000%> (+1.636%) ⬆️
Sources/Sentry/SentryTracer.m 97.049% <100.000%> (ø)
...SentryProfilerTests/SentryProfileTestFixture.swift 99.703% <100.000%> (+0.011%) ⬆️
Tests/SentryTests/PrivateSentrySDKOnlyTests.swift 99.752% <100.000%> (+0.016%) ⬆️
...ests/SentryTests/SentryBinaryImageCacheTests.swift 100.000% <100.000%> (ø)
...ts/SentryCrash/SentryDebugImageProviderTests.swift 100.000% <100.000%> (ø)
...ts/SentryTests/Transaction/SentryTracerTests.swift 98.466% <100.000%> (+0.002%) ⬆️
... and 1 more

... and 47 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37fd7a2...d79d53c. Read the comment docs.

Copy link

github-actions bot commented Nov 15, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1240.00 ms 1249.88 ms 9.88 ms
Size 22.30 KiB 730.96 KiB 708.66 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
b11cd87 1234.51 ms 1250.52 ms 16.01 ms
5b14b06 1196.33 ms 1227.00 ms 30.67 ms
aa4eddf 1228.21 ms 1236.72 ms 8.51 ms
a4ee85b 1227.57 ms 1232.32 ms 4.75 ms
4d3df92 1245.35 ms 1259.58 ms 14.23 ms
e8b11f8 1233.66 ms 1249.74 ms 16.08 ms
6161814 1216.90 ms 1233.18 ms 16.29 ms
742d4b6 1217.04 ms 1229.38 ms 12.33 ms
2124551 1231.78 ms 1264.94 ms 33.16 ms
ecd9ecd 1215.77 ms 1238.70 ms 22.93 ms

App size

Revision Plain With Sentry Diff
b11cd87 21.58 KiB 631.86 KiB 610.28 KiB
5b14b06 22.84 KiB 402.56 KiB 379.72 KiB
aa4eddf 21.58 KiB 544.86 KiB 523.28 KiB
a4ee85b 20.76 KiB 434.92 KiB 414.16 KiB
4d3df92 22.85 KiB 413.45 KiB 390.60 KiB
e8b11f8 22.85 KiB 411.92 KiB 389.07 KiB
6161814 21.58 KiB 713.97 KiB 692.39 KiB
742d4b6 21.58 KiB 546.19 KiB 524.61 KiB
2124551 22.85 KiB 411.69 KiB 388.84 KiB
ecd9ecd 20.76 KiB 420.23 KiB 399.47 KiB

Previous results on branch: impr/speed-up-get-debug-images-v2

Startup times

Revision Plain With Sentry Diff
da9ddd8 1233.22 ms 1249.96 ms 16.73 ms

App size

Revision Plain With Sentry Diff
da9ddd8 22.30 KiB 730.78 KiB 708.47 KiB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants