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

fix: changes to hopefully improve startup and ANRs [WPB-6048] #2611

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

saleniuk
Copy link
Contributor

@saleniuk saleniuk commented Jan 23, 2024

BugWPB-6048 [ANR][Android] com.wire.android.ui.WireActivity.onCreate

Cherry pick from the original PR:


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

There is a most frequent ANR related to the installSplashScreen and happens when launching the app and the app startup on some devices can take even many seconds.

Solutions

Number of small things that will hopefully speed up the launch and reduce number of ANRs or at least help us better investigate it:

  • fix datadog logger builder
  • provide logs for app startup (initialisations that happens in onCreate in WireApplication and WireActivity)
  • add "App startup" jetpack library and make it so that Firebase and WorkManager is initialised this way
  • run some init actions on coroutine
  • wrap some injected elements in Lazy so that they are initialised only when needed not on the main thread
  • bring back the splashscreen logo for Androids up to 12

Testing

How to Test

Launch the app.


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@saleniuk saleniuk added the cherry-pick PR is cherry-picking changes from another banch label Jan 23, 2024
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 47 lines in your changes are missing coverage. Please review.

Comparison is base (9601c92) 41.27% compared to head (bec0cad) 41.22%.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2611      +/-   ##
=============================================
- Coverage      41.27%   41.22%   -0.05%     
  Complexity      1140     1140              
=============================================
  Files            365      367       +2     
  Lines          13257    13272      +15     
  Branches        1751     1752       +1     
=============================================
  Hits            5472     5472              
- Misses          7258     7273      +15     
  Partials         527      527              
Files Coverage Δ
.../wire/android/initializer/InitializerEntryPoint.kt 0.00% <0.00%> (ø)
.../wire/android/ui/calling/ProximitySensorManager.kt 0.00% <0.00%> (ø)
...rc/main/kotlin/com/wire/android/WireApplication.kt 0.00% <0.00%> (ø)
...om/wire/android/initializer/FirebaseInitializer.kt 0.00% <0.00%> (ø)
...rc/main/kotlin/com/wire/android/ui/WireActivity.kt 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9601c92...bec0cad. Read the comment docs.

Copy link
Contributor

github-actions bot commented Jan 23, 2024

Test Results

750 tests  ±0   750 ✅ ±0   6m 47s ⏱️ - 4m 46s
105 suites ±0     0 💤 ±0 
105 files   ±0     0 ❌ ±0 

Results for commit bec0cad. ± Comparison against base commit 9601c92.

♻️ This comment has been updated with latest results.

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 2694 succeeded.

The build produced the following APK's:

@saleniuk saleniuk requested review from a team, typfel, yamilmedina, alexandreferris, MohamadJaara and mchenani and removed request for a team January 24, 2024 07:54
@yamilmedina yamilmedina enabled auto-merge January 24, 2024 08:30
@yamilmedina yamilmedina added this pull request to the merge queue Jan 24, 2024
Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

Merged via the queue into develop with commit 06b1be8 Jan 24, 2024
13 of 14 checks passed
@yamilmedina yamilmedina deleted the fix/app-startup-ANR-cherry-pick branch January 24, 2024 09:12
@AndroidBob
Copy link
Collaborator

Build 2700 succeeded.

The build produced the following APK's:

@echoes-hq echoes-hq bot added the echoes: technical-roadmap Work contributing to the Technical Roadmap, to improve our velocity or reduce the technical debt. label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch echoes: technical-roadmap Work contributing to the Technical Roadmap, to improve our velocity or reduce the technical debt. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants