Skip to content

feat: use only one animation flush and and only in case of existing masks#191

Merged
abelonogov-ld merged 2 commits into
mainfrom
andrey/flush-optimization
May 23, 2026
Merged

feat: use only one animation flush and and only in case of existing masks#191
abelonogov-ld merged 2 commits into
mainfrom
andrey/flush-optimization

Conversation

@abelonogov-ld
Copy link
Copy Markdown
Contributor

@abelonogov-ld abelonogov-ld commented Apr 24, 2026

CATransaction.flush() works, but it forces synchronous compositor work on the main thread. PR reduces load of main thread by using only one call in masking and only when masks are present


Note

Medium Risk
Touches the session replay capture/masking pipeline; conditionalizing CATransaction.flush() could affect mask alignment/timing and thus privacy masking correctness if assumptions are wrong.

Overview
Reduces main-thread compositor work during session replay capture by removing the unconditional CATransaction.flush() and only flushing when the pre-capture mask scan finds at least one mask to apply.

Updates the test app menu so the "One TextField" session replay row is wrapped with .ldMask() (plus a tiny layout/formatting tweak in the button row).

Reviewed by Cursor Bugbot for commit 1b143c4. Bugbot is set up for automated code reviews on this repo. Configure here.

@abelonogov-ld abelonogov-ld requested a review from a team as a code owner April 24, 2026 23:47
* main:
  fix: iOS26 SwiftUI masking cases (#195)
  chore(main): release 0.34.1 (#197)
  fix(replay): propagate explicit mask/unmask state through view hierarchy (#196)
  chore(main): release 0.34.0 (#194)
  feat: Remove SwiftProtoBuf dependency (#193)
  docs: Readme Masking rules (#192)
@abelonogov-ld abelonogov-ld merged commit 2a09883 into main May 23, 2026
6 checks passed
@abelonogov-ld abelonogov-ld deleted the andrey/flush-optimization branch May 23, 2026 04:14
abelonogov-ld pushed a commit that referenced this pull request May 23, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.35.0](0.34.1...0.35.0)
(2026-05-23)


### Features

* use only one animation flush and and only in case of existing masks
([#191](#191))
([2a09883](2a09883))


### Bug Fixes

* iOS26 SwiftUI masking cases
([#195](#195))
([386d0ad](386d0ad))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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