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

Trivial improvements to RootDetector #1815

Merged
merged 1 commit into from Mar 9, 2023

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented Mar 9, 2023

Goal

Slightly improve the RootDetector overhead.

Changeset

  • Use any instead of count() > 0 to early exit when checking the system build-props
  • Use a volatile boolean instead of AtomicBoolean to check library-load (no CAS operations are used)
  • Use a Reader.isNotBlank function instead of Reader.readText().isNotBlank()

Testing

Modified the unit test, and added a new test for the which su check returning a blank (but not empty) string

@lemnik lemnik requested a review from tomlongridge March 9, 2023 11:10
@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Mar 9, 2023

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1921.31 1696.73
arm64_v8a 680.33 459.15
armeabi_v7a 614.8 393.62
x86 754.04 532.86
x86_64 725.38 504.19

Generated by 🚫 Danger

@lemnik lemnik force-pushed the PLAT-9797/root-detector-improvements branch from d83c4e7 to 3d8ba45 Compare March 9, 2023 11:11
@lemnik lemnik force-pushed the PLAT-9797/root-detector-improvements branch from 3d8ba45 to cb8ef44 Compare March 9, 2023 11:18
@lemnik lemnik merged commit 9e2f32a into next Mar 9, 2023
@lemnik lemnik deleted the PLAT-9797/root-detector-improvements branch March 9, 2023 17:19
@lemnik lemnik mentioned this pull request Mar 23, 2023
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.

None yet

3 participants