Skip to content

[cloud_firestore] Xcode build extremely slow #349

Description

@kroikie

EDIT (@Salakar): See #2751 for a solution.


Summary of Issue

Simply adding cloud_firestore to pubspec.yaml results in a huge increase in iOS xcode build times. The issue can be recreate with nothing more than a simple flutter create application and minor changes to pubspec.yaml.

MacOS Mojave 10.14.6
Xcode 10.3
> flutter --version
Flutter 1.8.4-pre.91 • channel master • https://github.com/flutter/flutter.git
Framework • revision 8fdd759225 (11 hours ago) • 2019-08-04 00:56:23 -0400
Engine • revision c8f4f5d5cc
Tools • Dart 2.5.0 (build 2.5.0-dev.1.0 9bb446aae1)
> flutter create test_cloud_firestore
> cd test_cloud_firestore

Without cloud_firestore

Just to show that it is specifically the cloud_firestore plugin that causes this issue I will add some other firebase plugins to pubspec.yaml:

firebase_core: ^0.4.0+1
firebase_analytics: ^4.0.2

Now we build the app:

> flutter packages get
> time flutter build ios
....
Xcode build done. 
real	0m41.014s

Okay that looks reasonable.

With cloud_firestore

Simply add the latest version of cloud_firestore plugin to pubspec.yaml (no other changes):

cloud_firestore: ^0.12.9

Now we build the application again:

> flutter packages get
> time flutter build ios
....
Xcode build done. 
real	6m40.982s

Yes... that is right. A six minute increase in iOS build times just from adding the cloud_firestore plugin to pubspec.yaml. Again, no changes were made to the flutter create generated application, this is simply changes to pubspec.yaml.

Logs

I did confirm that this issue persists on other flutter channels as well as other later versions of cloud_firestore plugin.

> flutter doctor -v
[✓] Flutter (Channel master, v1.8.4-pre.91, on Mac OS X 10.14.6 18G84, locale en-US)
    • Flutter version 1.8.4-pre.91 at /Users/taza/Applications/flutter
    • Framework revision 8fdd759225 (11 hours ago), 2019-08-04 00:56:23 -0400
    • Engine revision c8f4f5d5cc
    • Dart version 2.5.0 (build 2.5.0-dev.1.0 9bb446aae1)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at /Users/taza/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.3, Build version 10G8
    • CocoaPods version 1.7.5

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 37.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.36.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.3.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    impact: criticalUsually a production crash with high user impact. (P1)impact: crowdAffects many people, though not necessarily a specific customer with an assigned label. (P2)platform: iosIssues / PRs which are specifically for iOS.plugin: cloud_firestoretype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions