You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 21a827f
Browse filesBrowse the repository at this point in the historyBrowse files
authored
perf(replay): Use hash set for mask view class lookups (#6410)
* perf(replay): Use hash set for mask view class lookups
maskViewClasses and unmaskViewClasses were backed by a
CopyOnWriteArraySet, whose contains() is a linear scan. The view
hierarchy traversal checks both sets for every superclass of every
view on the main thread, so capture cost grew with the size of the
configured class lists.
Back both sets with a ConcurrentHashMap key set for O(1) lookups
while keeping thread-safe, non-throwing iteration.
Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
* changelog
Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
* fix(replay): Ignore null mask view class names
ConcurrentHashMap-backed sets reject null keys, while the previous
CopyOnWriteArraySet accepted them. Hybrid SDKs (e.g. React Native via
ReadableArray.getString) can pass null despite the @NotNull annotation,
which would now throw during SDK init.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@
7
7
- Added `Environment` to the `Scope`, allowing you to overwrite the `Environment` set on the options ([#5772](https://github.com/getsentry/sentry-java/pull/5772))
8
8
- The scope `Environment` is also applied to the trace envelope header (DSC), logs, metrics and profiles, so all telemetry of a trace reports the same environment
9
9
10
+
### Improvements
11
+
12
+
- Speed up Session Replay and screenshot masking for large `maskViewClasses`/`unmaskViewClasses` lists by using constant-time class lookups ([#6410](https://github.com/getsentry/sentry-java/pull/6410))
13
+
10
14
### Fixes
11
15
12
16
- Keep UI profiling running when `startProfiler` is called before a requested stop takes effect at the end of the current chunk ([#6291](https://github.com/getsentry/sentry-java/pull/6291))
0 commit comments