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

Add more Firebase performance tracing. Improve Android boot time. #4247

Merged
merged 16 commits into from
Jul 28, 2021

Conversation

marcaaron
Copy link
Contributor

@marcaaron marcaaron commented Jul 27, 2021

Details

This PR achieves a few things all related to improving or monitoring cold boot times (which need improvement on Android specifically):

  1. Adds a new custom event to Firebase sidebar_loaded so that we can check when the sidebar loads (this should be when it is actually on the screen and not when the list component lays out)
  2. Delays the splash screen until the sidebar is fully loaded. The current iteration of the app has the screen going "grey" since the sidebar is not actually rendered on screen yet so this improves things psychologically.
  3. Stops sending logs to Grafana while we are on dev. I'm not sure why we are doing this as dev readings are subject to wildly different scenarios than whatever is on production/release.
  4. And most importantly we are delaying the rendering of the current report until after the sidebar has loaded. This could be optimized in the future depending on whether we are deep linking into a report or not (in that case maybe we would delay the sidebar), but for now it gets the app loading a bit faster.

Fixed Issues

$ #4027

Tests

  1. Build the app and log in. There's no real tests just make sure it works on all platforms.

As far as benchmarks go I timed how long it takes the sidebar to appear on screen before and after the changes

sidebar_load Before Changes (ms) sidebar_load After Changes (ms)
2274 445
2210 496
2183 274
2250 270
2306 361
2286 669
2262 270
2326 320
2326 261
2300 400
Avg Avg
2272.3 376.6

QA Steps

No QA

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

@marcaaron marcaaron self-assigned this Jul 27, 2021
@marcaaron marcaaron changed the title [WIP] Add more Firebase performance tracing. Improve Android boot time. Add more Firebase performance tracing. Improve Android boot time. Jul 28, 2021
@marcaaron marcaaron marked this pull request as ready for review July 28, 2021 05:00
@marcaaron marcaaron requested a review from a team as a code owner July 28, 2021 05:00
@MelvinBot MelvinBot requested review from luacmartins and removed request for a team July 28, 2021 05:00
Copy link
Contributor

@luacmartins luacmartins left a comment

Choose a reason for hiding this comment

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

Wow this is HUGE! Great work @marcaaron!

@luacmartins luacmartins merged commit 96a4cf1 into main Jul 28, 2021
@luacmartins luacmartins deleted the marcaaron-androidStartup branch July 28, 2021 17:04
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging in version: 1.0.80-3🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production in version: 1.0.81-4🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

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