Optimize isMainProcess detection#3489
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #3489 +/- ##
===========================================
- Coverage 72.34% 72.17% -0.17%
===========================================
Files 964 964
Lines 35583 35586 +3
Branches 5926 5928 +2
===========================================
- Hits 25742 25684 -58
- Misses 8249 8288 +39
- Partials 1592 1614 +22
🚀 New features to boost your workflow:
|
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
kikoveiga
previously approved these changes
Jun 1, 2026
0xnm
force-pushed
the
nogorodnikov/optimize-main-process-detection
branch
from
June 1, 2026 12:25
436174c to
4097301
Compare
kikoveiga
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
A bit of startup optimization which can shave of a few milliseconds: querying for all packages/processes on the device may be expensive, so we just can rely on the fact that the main process has the same name as package name.
See https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/core/java/android/app/Application.java;l=339-345?q=Application.java
On the versions below Android P we can use the old approach.
Review checklist (to be filled by reviewers)