Flutter app slow

debug mode

  • launch is slow
  • blink when launch
  • app size big.

because debug mode with Hot reloads.

when you create release apk https://flutter.io/docs/deployment/android

you can find

  • fast launch
  • no blink during the launch
  • app size small (but bigger than the normal android app)

EDIT

https://flutter.io/docs/testing/ui-performance#debug-flags

Debug mode enables additional checks (such as asserts) that don’t run in profile or release builds, and these checks can be expensive.
Debug mode also executes code in a different way than release mode. The debug build compiles the Dart code “just in time” (JIT) as the app runs, but profile and release builds are pre-compiled to native instructions (also called “ahead of time”, or AOT) before the app is loaded onto the device. JIT can cause the app to pause for JIT compilation, which itself can cause jank.

https://github.com/flutter/flutter/wiki/Flutter%27s-modes

Debug mode on device (including simulators, emulators): Turns on all the assertions in the world, includes all debugging information, enables all the debugger aids (e.g. observatory) and service extensions. Optimizes for fast develop/run cycles. Does not optimize for execution speed, binary size, or deployment. Used by flutter run. Built with sky/tools/gn –android or sky/tools/gn –ios. Also sometimes called “checked mode” or “slow mode”.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)