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

Pre-launch report shows significant app start time increase since we start without Bluetooth #317

Open
MrCsabaToth opened this issue Jul 22, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@MrCsabaToth
Copy link
Member

#299 removed the mandatory Bluetooth initialization and permission soliciting at app start. I suspected this would lead to shorter app start times since I removed a few artificial delays and also the BT (flutter_blue_plus) initialization. The start time is hindered anyway by the Flutter engine start and bootstrap. I didn't feel too much difference when starting the older version of the app vs the newer version. The Google Play Store pre-launch report however showed very stark changes!

Before the change: start times were quarter second or half a second a few were above 1 or 2 seconds. Average memory consumption around 100-150MB
Screenshot_2022-07-21_19-29-25

After the change: every start time is above 3-4 seconds, a few are above 6-7! Some memory load is above 200MB.
Screenshot_2022-07-21_19-28-32

I have several factors in mind:

  • I upgraded to Flutter 3 versions, that may change things, although I thought in the good direction
  • I also migrated from the dormant flutter_blue to the boskosg flutter_blue_plus, that may have some delays in itself, and might initialize via plugin API events even if we don't explicitly initialize it?
  • Now that the app doesn't bother the testing setup with Bluetooth enable enforcing maybe it measures the start time differently than before? This can be certainly true because in the past often the start time wasn't even measured.
@MrCsabaToth MrCsabaToth added the bug Something isn't working label Jul 22, 2022
@MrCsabaToth
Copy link
Member Author

MrCsabaToth commented Sep 3, 2022

Very janky: the Samsung SM-960U1 was now 554ms only, but the Nokia broke a record with 16.8 sec, build 117:
Screenshot_2022-09-02_18-15-03

@MrCsabaToth
Copy link
Member Author

Looks like that despite of latest Flutter version bumps there are still some start times which are 10-12 seconds. That's way over the 6 second default scan length. So it's still a mystery what the Play Store's test bootstrap does for these outrageous times. Maybe the app present permission related dialogs or to turn the Bluetooth on?
One thing though is that I keep adding Flutter plugins. The latest two are string_validator and number_selector, and these are both UI-only ones, so they won't increase start time, but when I'll introduce isar for #269 that can increase the start time. However I have a feeling that those start times are so outrageous that there must be something else than the plugins or the Flutter engine itself.

@MrCsabaToth
Copy link
Member Author

Isar is now in production. A year from now I'll remove the old Floor / Sqflite backend, and hopefully that will help a little along with Flutter framework enhancements (which are outside of my control). It'll also help when the test will be Flutter aware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant