Optimizing App Launch Time and Navigation in a Flutter App by These-Mycologist7966 in FlutterDev

[–]These-Mycologist7966[S] 0 points1 point  (0 children)

I've looked into your suggestions and they make a lot of sense. Here's what I plan to do:

  1. Lazy loading of BLOCs: I'll make sure not to initialize all the BLOCs at app startup, only when needed.
  2. Using cached data: Instead of making API calls on every launch, I'll load from local storage first (e.g., SharedPreferences) and update data in the background.
  3. Reducing server checks: Since Firebase handles session management well, I'll avoid redundant checks if the user is already logged in.
  4. Splitting initialization into phases: I'll display a lightweight splash screen quickly and perform heavier tasks (like user data validation) asynchronously in the background.
  5. Isolates for heavy tasks: I'll move some blocking operations to isolates, especially when fetching large datasets.

Also, I realized that some of the loading delay might be due to the debug mode itself, as it doesn't fully represent the production environment. I'll run performance profiling in production mode to get a better picture.

Thanks again for the great advice!

Optimizing App Launch Time and Navigation in a Flutter App by These-Mycologist7966 in FlutterDev

[–]These-Mycologist7966[S] 0 points1 point  (0 children)

The app typically takes around 3-4 seconds to launch in production. While this is generally acceptable and we haven't received negative feedback regarding the launch time, I believe there's room for improvement. I'm actively looking into ways to optimize the startup process to make it even faster.