-
-
Notifications
You must be signed in to change notification settings - Fork 329
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: Session replay performance for SwiftUI #4419
Changes from 6 commits
54f75f4
abf50f5
aa44776
b11302b
8407dc7
3b749a3
ff12637
9a7162e
9c3e297
1ca9f1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -27,7 +27,7 @@ enum RedactRegionType { | |||
case redactSwiftUI | ||||
} | ||||
|
||||
struct RedactRegion { | ||||
struct RedactRegion: Equatable { | ||||
let size: CGSize | ||||
let transform: CGAffineTransform | ||||
let type: RedactRegionType | ||||
|
@@ -39,6 +39,10 @@ struct RedactRegion { | |||
self.type = type | ||||
self.color = color | ||||
} | ||||
|
||||
static func == (lhs: RedactRegion, rhs: RedactRegion) -> Bool { | ||||
lhs.size == rhs.size && lhs.transform == rhs.transform && lhs.type == rhs.type | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of this cause the equals here doesn't include the color. This can be very confusing. I would prefer adding a helper method or something different if you only want to check if to redact regions are the same without considering the color. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, we can do that. |
||||
} | ||||
} | ||||
|
||||
class UIRedactBuilder { | ||||
|
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.
m
: It seems like this speeds up the performance significantly. Maybe it's worth adding a comment for this, cause we don't have a test to validate that we do this.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.
We do have a test to validate this.
Its the only test added to this PR