What is profile mode and when do you use it?

Technology CommunityCategory: FlutterWhat is profile mode and when do you use it?
VietMX Staff asked 3 years ago
  • In profile mode, some debugging ability is maintained—enough to profile your app’s performance.
  • Profile mode is used when you want to analyze performance.
  • Profile mode is disabled on the emulator and simulator, because their behavior is not representative of real performance.
  • On mobile, profile mode is similar to release mode, with the following differences: – Some service extensions, such as the one that enables the performance overlay, are enabled. – Tracing is enabled, and tools supporting source-level debugging (such as DevTools) can connect to the process.
  • Profile mode for a web app means that: – The build is not minified but tree shaking has been performed. – The app is compiled with the dart2js compiler.
  • The command flutter run --profile compiles to profile mode.