-
-
Notifications
You must be signed in to change notification settings - Fork 368
fix(session-replay): Update rendering method for fast view rendering #6360
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
Conversation
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, thanks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6360 +/- ##
=============================================
+ Coverage 86.818% 87.301% +0.482%
=============================================
Files 438 438
Lines 37311 37311
Branches 17428 17434 +6
=============================================
+ Hits 32393 32573 +180
+ Misses 4874 4693 -181
- Partials 44 45 +1
... and 9 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
2ec2700 | 1238.28 ms | 1258.82 ms | 20.53 ms |
d0f70ce | 1226.54 ms | 1247.04 ms | 20.50 ms |
5bf2b17 | 1213.53 ms | 1238.54 ms | 25.01 ms |
efab7d3 | 1219.98 ms | 1252.12 ms | 32.14 ms |
e3ebff3 | 1223.47 ms | 1249.27 ms | 25.80 ms |
7b3399c | 1193.35 ms | 1227.38 ms | 34.03 ms |
3133d0e | 1237.86 ms | 1262.87 ms | 25.01 ms |
22b6996 | 1234.00 ms | 1263.24 ms | 29.24 ms |
43597ba | 1214.88 ms | 1243.52 ms | 28.65 ms |
fc6557e | 1226.40 ms | 1249.88 ms | 23.48 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
2ec2700 | 23.75 KiB | 980.80 KiB | 957.05 KiB |
d0f70ce | 23.75 KiB | 913.09 KiB | 889.34 KiB |
5bf2b17 | 23.75 KiB | 913.27 KiB | 889.52 KiB |
efab7d3 | 23.75 KiB | 912.78 KiB | 889.03 KiB |
e3ebff3 | 23.75 KiB | 878.48 KiB | 854.73 KiB |
7b3399c | 23.75 KiB | 946.68 KiB | 922.94 KiB |
3133d0e | 23.74 KiB | 976.79 KiB | 953.04 KiB |
22b6996 | 23.75 KiB | 908.02 KiB | 884.27 KiB |
43597ba | 23.75 KiB | 880.32 KiB | 856.58 KiB |
fc6557e | 23.75 KiB | 866.68 KiB | 842.93 KiB |
📜 Description
Fix incorrect implementation of fast view rendering in
SentryViewRendererV2
by switching fromCALayer.draw(in:)
toCALayer.render(in:)
.Why this matters:
CALayer.draw(in:)
only draws the layer's own contents and does not include sublayersCALayer.render(in:)
rasterizes the entire visual tree including all sublayers, which is required for accurate session replay snapshots💡 Motivation and Context
This fixes a regression introduced in PR #4940 where the wrong CALayer method was accidentally merged. The original PR tested
CALayer.render(in:)
and showed significant performance improvements (~160ms to ~30-36ms on iPhone 8), butCALayer.draw(in:)
was merged instead.For session replay, we need the complete visual representation including all sublayers, making
render(in:)
the correct choice, even if the fast view renderer is incomplete.Fixes the incorrect implementation from PR #4940.
💚 How did you test it?
Manual testing with session replay enabled in iOS-Swift sample app.
draw(in:)
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.