-
-
Notifications
You must be signed in to change notification settings - Fork 372
ref: Don't use functions for notification names #5566
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5566 +/- ##
=============================================
+ Coverage 86.140% 86.264% +0.123%
=============================================
Files 407 408 +1
Lines 35067 35069 +2
Branches 15017 15271 +254
=============================================
+ Hits 30207 30252 +45
+ Misses 4817 4770 -47
- Partials 43 47 +4
... and 22 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
b46bce5 to
5738cc0
Compare
5738cc0 to
1c1e623
Compare
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7148f97 | 1235.09 ms | 1258.07 ms | 22.98 ms |
| db9572a | 1200.27 ms | 1234.80 ms | 34.53 ms |
| 018037b | 1209.31 ms | 1228.33 ms | 19.03 ms |
| 7908e84 | 1224.33 ms | 1246.39 ms | 22.06 ms |
| 2691350 | 1224.92 ms | 1255.82 ms | 30.90 ms |
| fdea6f5 | 1216.08 ms | 1241.82 ms | 25.73 ms |
| d637379 | 1226.43 ms | 1250.77 ms | 24.34 ms |
| f97a070 | 1218.88 ms | 1253.12 ms | 34.24 ms |
| 63ac649 | 1192.10 ms | 1216.78 ms | 24.68 ms |
| aa0b738 | 1236.78 ms | 1253.08 ms | 16.31 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7148f97 | 23.75 KiB | 854.78 KiB | 831.03 KiB |
| db9572a | 23.75 KiB | 858.69 KiB | 834.93 KiB |
| 018037b | 23.75 KiB | 867.16 KiB | 843.41 KiB |
| 7908e84 | 23.74 KiB | 872.75 KiB | 849.00 KiB |
| 2691350 | 23.75 KiB | 850.73 KiB | 826.98 KiB |
| fdea6f5 | 23.75 KiB | 867.15 KiB | 843.40 KiB |
| d637379 | 23.75 KiB | 855.38 KiB | 831.63 KiB |
| f97a070 | 23.75 KiB | 858.68 KiB | 834.93 KiB |
| 63ac649 | 23.75 KiB | 855.38 KiB | 831.63 KiB |
| aa0b738 | 23.74 KiB | 872.75 KiB | 849.00 KiB |
|
Way better thanks @noahsmartin. |
…)" This reverts commit 354b020.
…)" This reverts commit 354b020.
While looking at moving NotificationCenterWrapper to swift I noticed this separate cleanup opportunity. This moves the functions that bridged iOS/Mac notifications into a typedef, which is less lines of code (making it safer by reducing the chance for typos) and also more performant (less app size, fewer objc method dispatch)
It works even better in Swift (currently only used by tests) where you can just define a single typedef and get all the notifications bridged without having to write another line for each notification name
The main change is in
SentryNSNotificationCenterWrapper.hthe rest of the changes are just updating the callsites.#skip-changelog