Skip to content

Commit

Permalink
perf: Improve locks in SentryScope (#888)
Browse files Browse the repository at this point in the history
SentryScope contained many locks to self with @synchronized, which are not needed because not the
whole scope is modified in them. Now we only lock the objects that are modified in the
@synchronized block.

Fixes GH-880
  • Loading branch information
philipphofmann authored Jan 11, 2021
1 parent 99d92ab commit a81025d
Show file tree
Hide file tree
Showing 6 changed files with 390 additions and 192 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## unreleased

- perf: Improve locks in SentryScope #888

## 6.1.0-alpha.1

- fix: Change maxAttachmentSize from MiB to bytes #891
Expand Down
10 changes: 5 additions & 5 deletions Sources/Sentry/Public/SentryUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ NS_SWIFT_NAME(User)
/**
* Optional: Id of the user
*/
@property (nonatomic, copy) NSString *userId;
@property (atomic, copy) NSString *userId;

/**
* Optional: Email of the user
*/
@property (nonatomic, copy) NSString *_Nullable email;
@property (atomic, copy) NSString *_Nullable email;

/**
* Optional: Username
*/
@property (nonatomic, copy) NSString *_Nullable username;
@property (atomic, copy) NSString *_Nullable username;

/**
* Optional: IP Address
*/
@property (nonatomic, copy) NSString *_Nullable ipAddress;
@property (atomic, copy) NSString *_Nullable ipAddress;

/**
* Optional: Additional data
*/
@property (nonatomic, strong) NSDictionary<NSString *, id> *_Nullable data;
@property (atomic, strong) NSDictionary<NSString *, id> *_Nullable data;

/**
* Initializes a SentryUser with the id
Expand Down
Loading

0 comments on commit a81025d

Please # to comment.