Skip to content

Build time increased since Flutter 2.5.x on CI #90956

@gwennguihal

Description

@gwennguihal

We have noticed a big increase in build time on our CI since we migrated our project from 2.2.0 to 2.5.1 (both iOS and Android).
Here the results from an iOS build.

Steps to Reproduce

  1. Run flutter build --suppress-analytics ipa --verbose --release with flutter 2.2.0 (no cache, no artifacts).
  2. Run flutter build --suppress-analytics ipa --verbose --release with flutter 2.5.1.

Results:
2.2.0 (about 5 minutes):

[  +51 ms] /Users/admin/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev
 /Users/admin/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root
 /Users/admin/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/ --target=flutter
 --no-print-incremental-dependencies -Ddart.vm.profile=false -Ddart.vm.product=true --aot --tfa --packages
.dart_tool/package_config.json --output-dill
.dart_tool/flutter_build/221614ab0d60118f710f404975226427/app.dill --depfile
.dart_tool/flutter_build/221614ab0d60118f710f404975226427/kernel_snapshot.d
 package:*****/main.dart
 [+300735 ms] kernel_snapshot: Complete

2.5.1 (about 22 minutes):

[  +77 ms] /Users/admin/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev 
/Users/admin/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root 
/Users/admin/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/ --target=flutter 
--no-print-incremental-dependencies -Ddart.vm.profile=false -Ddart.vm.product=true --aot --tfa --packages 
.dart_tool/package_config.json --output-dill 
.dart_tool/flutter_build/071684a0ea56da865020f87105c05eea/app.dill --depfile 
.dart_tool/flutter_build/071684a0ea56da865020f87105c05eea/kernel_snapshot.d 
package:*****/main.dart
[+1324254 ms] kernel_snapshot: Complete

Pubspec

We didn't add new dependencies in the projet between 2.2 and 2.5.

Pubspec 2.2.0
name: *******
description: The ****** project.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none'

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+20

environment:
  sdk: '>=2.12.0 <3.0.0'
  flutter: ^2.2.0

dependencies:
  flutter:
    sdk: flutter
  get_it: ^7.1.3
  flutter_localizations:
    sdk: flutter
  location: ^4.1.1
  url_launcher: ^6.0.2
  webview_flutter: ^2.0.7

  firebase_core: ^1.2.0
  firebase_analytics: ^8.1.0
  firebase_messaging: ^10.0.0
  firebase_crashlytics: ^2.0.4
  firebase_dynamic_links: ^2.0.4

  google_mobile_ads: ^0.13.4
  google_maps_flutter: ^2.0.5
  background_app_bar: ^2.0.0
  sliding_sheet: ^0.5.0
  bubble_tab_indicator: ^0.1.6
  sdk:
    path: ../*****-bff/sdk/dart
  idfm_sdk:
    path: plugins/****_sdk
  sips_sdk:
    path: plugins/****_sdk
  oui_migration:
    path: plugins/***_migration
  shared_preferences: ^2.0.5
  carousel_slider: ^4.0.0-nullsafety.0
  core:
    path: core
  design_system:
    path: design_system
  i18n:
    path: i18n
  animator: ^3.0.0
  flutter_html: ^2.0.0
  i18n_tech:
    path: i18n_tech
  dio_http_cache: ^0.3.0
  dio: ^4.0.0
  device_info: ^2.0.1
  devicelocale: ^0.4.1
  flutter_device_type: ^0.4.0
  equatable: ^2.0.3
  flutter_bloc: ^7.3.0
  stream_transform: ^2.0.0
  flutter_linkify: ^5.0.2
  instana_agent: ^2.0.1
  map_launcher: ^2.0.0
  open_mail_app: ^0.1.1
  common_dependencies:
    path: ./common_dependencies
  uni_links: ^0.5.1
  datadome_flutter_dio: ^1.0.1
  visibility_detector: ^0.2.0
  package_info: ^2.0.0
  batch_flutter: ^1.0.0-rc.1
  didomi_sdk: ^0.0.1-alpha.1
  speech_to_text: ^4.2.1
  advertising_id: ^2.0.0
  unique_identifier: ^0.2.0
  substring_highlight: ^1.0.33
  device_info_plus: ^2.1.0

dev_dependencies:
  common_dev_dependencies:
    path: ./common_dev_dependencies
  effective_dart: ^1.3.1
  flutter_test:
    sdk: flutter
  build: ^2.0.0
  flutter_launcher_icons: ^0.9.0
  auto_route_generator: ^2.1.0
  sdk_fixture:
    path: ../invictus-bff/sdk/dart/fixture
  bloc_test: ^8.0.0
  build_runner: ^2.0.3
  flutter_native_splash: ^1.2.0
  flutter_ume: ^0.2.0-dev.0
  flutter_ume_kit_ui: ^0.2.0-dev.0
  flutter_ume_kit_perf: ^0.2.0-dev.0
  flutter_ume_kit_show_code: ^0.2.0-dev.0
  flutter_ume_kit_device: ^0.2.1
  flutter_ume_kit_dio: ^0.2.0
  pigeon: ^0.3.0

dependency_overrides:
  vm_service: ^7.1.1
  provider: ^6.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

flutter_icons:
  image_path: assets/icon/icnapp_Light-512px.png
  android: true
  ios: true
flutter_launcher_name:
  name: Invictus
flutter_native_splash:
  background_image: assets/images/splashscreen.png

# The following section is specific to Flutter.
flutter:
  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/images/
    - assets/svg/
    - assets/svg/account/
    - assets/svg/onboarding/
    - assets/svg/icon/
    - assets/svg/deliveryMode/
    - assets/svg/tripsAndTickets/
    - assets/svg/luggage/
    - assets/json/
    - assets/map_style/
    - assets/svg/bikes/

  fonts:
    - family: Achemine
      fonts:
        - asset: design_system/lib/text_fonts/achemine.ttf
        - asset: design_system/lib/text_fonts/achemine_bold.ttf
          weight: 700
    - family: Avenir
      fonts:
        - asset: design_system/lib/text_fonts/avenir_medium.ttf
        - asset: design_system/lib/text_fonts/avenir_heavy.ttf
          weight: 700
    - family: NavigationAndAction
      fonts:
        - asset: design_system/lib/icon_fonts/NavigationAndAction.ttf
    - family: MEA
      fonts:
        - asset: design_system/lib/icon_fonts/MEA.ttf
    - family: ServicesOnBoard
      fonts:
        - asset: design_system/lib/icon_fonts/ServicesOnBoard.ttf
    - family: Sleeping
      fonts:
        - asset: design_system/lib/icon_fonts/Sleeping.ttf
    - family: Supplier
      fonts:
        - asset: design_system/lib/icon_fonts/Supplier.ttf
    - family: Area
      fonts:
        - asset: design_system/lib/icon_fonts/Area.ttf
    - family: Classes
      fonts:
        - asset: design_system/lib/icon_fonts/Classes.ttf
    - family: CardsAndSubscriptions
      fonts:
        - asset: design_system/lib/icon_fonts/CardsAndSubscriptions.ttf
    - family: Communication
      fonts:
        - asset: design_system/lib/icon_fonts/Communication.ttf
    - family: Divers
      fonts:
        - asset: design_system/lib/icon_fonts/Divers.ttf
    - family: Payment
      fonts:
        - asset: design_system/lib/icon_fonts/Payment.ttf
    - family: Placement
      fonts:
        - asset: design_system/lib/icon_fonts/Placement.ttf
    - family: Typology
      fonts:
        - asset: design_system/lib/icon_fonts/Typology.ttf
    - family: SocialNetworks
      fonts:
        - asset: design_system/lib/icon_fonts/SocialNetworks.ttf
    - family: Mobility
      fonts:
        - asset: design_system/lib/icon_fonts/Mobility.ttf
    - family: Transporters
      fonts:
        - asset: design_system/lib/icon_fonts/Transporters.ttf
    - family: Walk
      fonts:
        - asset: design_system/lib/icon_fonts/Walk.ttf
    - family: Navigation
      fonts:
        - asset: design_system/lib/icon_fonts/Navigation.ttf
    - family: Satisfaction
      fonts:
        - asset: design_system/lib/icon_fonts/Satisfaction.ttf
Pubspec 2.5.1
name: *******
description: The ****** project.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none'

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+20

environment:
  sdk: '>=2.12.0 <3.0.0'
  flutter: ^2.5.1

dependencies:
  flutter:
    sdk: flutter
  get_it: ^7.1.3
  flutter_localizations:
    sdk: flutter
  location: ^4.1.1
  url_launcher: ^6.0.10
  webview_flutter: ^2.0.7

  firebase_core: ^1.2.0
  firebase_analytics: ^8.1.0
  firebase_messaging: ^10.0.0
  firebase_crashlytics: ^2.0.4
  firebase_dynamic_links: ^2.0.4

  google_mobile_ads: ^0.13.4
  google_maps_flutter: ^2.0.5
  background_app_bar: ^2.0.0
  sliding_sheet: ^0.5.0
  bubble_tab_indicator: ^0.1.6
  sdk:
    path: ../*****-bff/sdk/dart
  idfm_sdk:
    path: plugins/****_sdk
  sips_sdk:
    path: plugins/****_sdk
  oui_migration:
    path: plugins/***_migration
  shared_preferences: ^2.0.5
  carousel_slider: ^4.0.0-nullsafety.0
  core:
    path: core
  design_system:
    path: design_system
  i18n:
    path: i18n
  animator: ^3.0.0
  flutter_html: ^2.1.2
  i18n_tech:
    path: i18n_tech
  dio_http_cache: ^0.3.0
  dio: ^4.0.0
  device_info: ^2.0.1
  devicelocale: ^0.4.1
  flutter_device_type: ^0.4.0
  equatable: ^2.0.3
  flutter_bloc: ^7.3.0
  stream_transform: ^2.0.0
  flutter_linkify: ^5.0.2
  instana_agent: ^2.0.1
  map_launcher: ^2.1.1
  open_mail_app: ^0.1.1
  common_dependencies:
    path: ./common_dependencies
  uni_links: ^0.5.1
  datadome_flutter_dio: ^1.0.1
  visibility_detector: ^0.2.0
  package_info: ^2.0.0
  batch_flutter: ^1.0.0-rc.1
  didomi_sdk: ^0.0.1-alpha.1
  speech_to_text: ^5.1.0
  advertising_id: ^2.0.0
  unique_identifier: ^0.2.0
  substring_highlight: ^1.0.33
  device_info_plus: ^2.1.0

dev_dependencies:
  common_dev_dependencies:
    path: ./common_dev_dependencies
  effective_dart: ^1.3.1
  flutter_test:
    sdk: flutter
  build: ^2.0.0
  flutter_launcher_icons: ^0.9.0
  auto_route_generator: ^2.3.2
  sdk_fixture:
    path: ../invictus-bff/sdk/dart/fixture
  bloc_test: ^8.0.0
  build_runner: ^2.1.2
  flutter_native_splash: ^1.2.0
  flutter_ume: ^0.2.0-dev.0
  flutter_ume_kit_ui: ^0.2.0-dev.0
  flutter_ume_kit_perf: ^0.2.0-dev.0
  flutter_ume_kit_show_code: ^0.2.0-dev.0
  flutter_ume_kit_device: ^0.2.1
  flutter_ume_kit_dio: ^0.2.0
  pigeon: ^1.0.4

dependency_overrides:
  # fix flutter_html sub dependency wakelock deprecation
  chewie: ^1.2.2
  analyzer: ^2.2.0
  provider: ^6.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

flutter_icons:
  image_path: assets/icon/icnapp_Light-512px.png
  android: true
  ios: true
flutter_launcher_name:
  name: Invictus
flutter_native_splash:
  background_image: assets/images/splashscreen.png

# The following section is specific to Flutter.
flutter:
  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/images/
    - assets/svg/
    - assets/svg/account/
    - assets/svg/onboarding/
    - assets/svg/icon/
    - assets/svg/deliveryMode/
    - assets/svg/tripsAndTickets/
    - assets/svg/luggage/
    - assets/json/
    - assets/map_style/
    - assets/svg/bikes/

  fonts:
    - family: Achemine
      fonts:
        - asset: design_system/lib/text_fonts/achemine.ttf
        - asset: design_system/lib/text_fonts/achemine_bold.ttf
          weight: 700
    - family: Avenir
      fonts:
        - asset: design_system/lib/text_fonts/avenir_medium.ttf
        - asset: design_system/lib/text_fonts/avenir_heavy.ttf
          weight: 700
    - family: NavigationAndAction
      fonts:
        - asset: design_system/lib/icon_fonts/NavigationAndAction.ttf
    - family: MEA
      fonts:
        - asset: design_system/lib/icon_fonts/MEA.ttf
    - family: ServicesOnBoard
      fonts:
        - asset: design_system/lib/icon_fonts/ServicesOnBoard.ttf
    - family: Sleeping
      fonts:
        - asset: design_system/lib/icon_fonts/Sleeping.ttf
    - family: Supplier
      fonts:
        - asset: design_system/lib/icon_fonts/Supplier.ttf
    - family: Area
      fonts:
        - asset: design_system/lib/icon_fonts/Area.ttf
    - family: Classes
      fonts:
        - asset: design_system/lib/icon_fonts/Classes.ttf
    - family: CardsAndSubscriptions
      fonts:
        - asset: design_system/lib/icon_fonts/CardsAndSubscriptions.ttf
    - family: Communication
      fonts:
        - asset: design_system/lib/icon_fonts/Communication.ttf
    - family: Divers
      fonts:
        - asset: design_system/lib/icon_fonts/Divers.ttf
    - family: Payment
      fonts:
        - asset: design_system/lib/icon_fonts/Payment.ttf
    - family: Placement
      fonts:
        - asset: design_system/lib/icon_fonts/Placement.ttf
    - family: Typology
      fonts:
        - asset: design_system/lib/icon_fonts/Typology.ttf
    - family: SocialNetworks
      fonts:
        - asset: design_system/lib/icon_fonts/SocialNetworks.ttf
    - family: Mobility
      fonts:
        - asset: design_system/lib/icon_fonts/Mobility.ttf
    - family: Transporters
      fonts:
        - asset: design_system/lib/icon_fonts/Transporters.ttf
    - family: Walk
      fonts:
        - asset: design_system/lib/icon_fonts/Walk.ttf
    - family: Navigation
      fonts:
        - asset: design_system/lib/icon_fonts/Navigation.ttf
    - family: Satisfaction
      fonts:
        - asset: design_system/lib/icon_fonts/Satisfaction.ttf

Flutter doctor

2.2:

[✓] Flutter (Channel stable, 2.2.0, on macOS 11.2.1 20D75 darwin-x64, locale en-US)
    • Flutter version 2.2.0 at /Users/admin/flutter
    • Framework revision b22742018b (5 months ago), 2021-05-14 19:12:57 -0700
    • Engine revision a9d88a4d18
    • Dart version 2.13.0

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5, Build version 12E262
    • CocoaPods version 1.11.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[!] Connected device
    ! No devices available

! Doctor found issues in 4 categories.

2.5:

[✓] Flutter (Channel stable, 2.5.1, on macOS 11.2.1 20D75 darwin-x64, locale en-US)
    • Flutter version 2.5.1 at /Users/admin/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ffb2ecea52 (12 days ago), 2021-09-17 15:26:33 -0400
    • Engine revision b3af521a05
    • Dart version 2.14.2

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5, Build version 12E262
    • CocoaPods version 1.11.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[!] Connected device
    ! No devices available

! Doctor found issues in 4 categories.

Anyone has the same issue?
Thanks ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: invalidIssue is closed as not valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions