Skip to content
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

Removed BugsnagReactNativeBridge.makeSafe #1990

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

YYChen01988
Copy link
Contributor

@YYChen01988 YYChen01988 commented Mar 7, 2024

Goal

Reduce the overhead of leaving breadcrumbs by removing the NativeBridge.makeSafe calls.

Design

Since all C strings are now passed into the Java/Kotlin layer using new String(byte[], any invalid byte sequences are removed there which makes makeSafe redundant. Removing makeSafe removes at least 6 data copies per breadcrumb.

Changeset

Removed makeSafe function from NativeBridge.

Testing

Relied on existing tests

@YYChen01988 YYChen01988 requested a review from lemnik March 7, 2024 11:30
@bugsnagbot
Copy link
Collaborator

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1842.85 1668.14
arm64_v8a 626.95 450.82
armeabi_v7a 561.42 385.29
x86 700.66 524.53
x86_64 671.99 495.86

Generated by 🚫 Danger

Copy link
Contributor

@lemnik lemnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YYChen01988 YYChen01988 merged commit e3215b4 into next Mar 7, 2024
27 checks passed
@YYChen01988 YYChen01988 deleted the PLAT-11685/remove_NativeBridge.makeSafe branch March 7, 2024 15:34
This was referenced Mar 13, 2024
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.

3 participants