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

ref: Improve frames tracker performance #4469

Merged
merged 4 commits into from
Oct 28, 2024
Merged

Conversation

brustolin
Copy link
Contributor

📜 Description

Improves the speed of the frames tracker by not locking it anymore since it always run in the main thread.

💡 Motivation and Context

Close #4466

💚 How did you test it?

Unit test

📝 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

Copy link

github-actions bot commented Oct 24, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1241.00 ms 1259.75 ms 18.75 ms
Size 21.90 KiB 708.95 KiB 687.05 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
51ffd8c 1234.40 ms 1246.22 ms 11.82 ms
b15521e 1224.44 ms 1251.13 ms 26.68 ms
3297d6e 1195.69 ms 1212.35 ms 16.65 ms
c6773e5 1222.48 ms 1240.02 ms 17.54 ms
39a4941 1210.69 ms 1219.83 ms 9.14 ms
ecd9ecd 1241.28 ms 1260.35 ms 19.07 ms
5269d20 1230.18 ms 1252.64 ms 22.46 ms
cbf6225 1221.73 ms 1251.20 ms 29.47 ms
3de9971 1224.38 ms 1245.33 ms 20.95 ms
add9550 1221.20 ms 1250.04 ms 28.84 ms

App size

Revision Plain With Sentry Diff
51ffd8c 21.58 KiB 418.69 KiB 397.11 KiB
b15521e 21.58 KiB 573.18 KiB 551.60 KiB
3297d6e 21.58 KiB 418.44 KiB 396.86 KiB
c6773e5 20.76 KiB 435.25 KiB 414.49 KiB
39a4941 22.84 KiB 402.63 KiB 379.79 KiB
ecd9ecd 20.76 KiB 420.23 KiB 399.47 KiB
5269d20 21.58 KiB 714.41 KiB 692.83 KiB
cbf6225 20.76 KiB 425.77 KiB 405.00 KiB
3de9971 21.58 KiB 574.17 KiB 552.59 KiB
add9550 21.58 KiB 418.37 KiB 396.79 KiB

Previous results on branch: ref/frametracker-improvement

Startup times

Revision Plain With Sentry Diff
2fdc69f 1224.80 ms 1243.60 ms 18.80 ms

App size

Revision Plain With Sentry Diff
2fdc69f 21.90 KiB 708.27 KiB 686.37 KiB

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

💯 thanks

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.812%. Comparing base (4569cc9) to head (3979106).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4469       +/-   ##
=============================================
- Coverage   91.818%   91.812%   -0.007%     
=============================================
  Files          610       610               
  Lines        68230     68237        +7     
  Branches     24493     24504       +11     
=============================================
+ Hits         62648     62650        +2     
- Misses        5489      5494        +5     
  Partials        93        93               
Files with missing lines Coverage Δ
Sources/Sentry/SentryFramesTracker.m 99.516% <100.000%> (-0.014%) ⬇️
...ance/FramesTracking/SentryFramesTrackerTests.swift 99.712% <100.000%> (+0.003%) ⬆️

... and 8 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 4569cc9...3979106. Read the comment docs.

@brustolin brustolin merged commit d802ba2 into main Oct 28, 2024
64 of 65 checks passed
@brustolin brustolin deleted the ref/frametracker-improvement branch October 28, 2024 08:03
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.

SentryFramesTracker.reportNewFrame acquires lock on the main thread
2 participants