-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cloud_firestore] Xcode build extremely slow #349
Comments
The issue at flutter/flutter#37582 has been closed and moved here. Future collaboration on this issue will be done here. |
@kroikie Ok. So does this new issue lose all the traction of flutter/flutter#37582 in terms of user reaction and up votes. From what I gather, that is what determines what gets worked on in the priority queue. I just want this "new" issue to have the same level of priority as the previous one did, which seemed to be a concern that was pretty widespread in the community. |
@walsha2 no we will still refer to the linked issue for reference during triage. The goal is to collect all future FlutterFire collaboration in a single place. |
@kroikie Still no solution for this? I have been struggling with this issue for days... |
Not sure if others have noticed: this whole "extremely slow" issue didn't exist in Flutter 1.0.0. |
Update: Building my application in an iOS Simulator is still very slow (sometimes above 500 seconds) and the problem seems to arise when using cloud_firestore plugin. So now i use my device instead. I build it through Xcode and attach flutter afterwards with "flutter attach -d device name" in terminal. |
I also encounter this problem on i7 MacBook Pro. Adding Sample output from deploying to simulator:
This was not clean build but some changes to dart code have been made. Previous clean build with Edit: switching to current master dropped this number to about 250-270 sec on a clean build!
|
Due to this problem I'm no longer developing on Mac even for iOS. I do most
of the development on Ubuntu Linux using an Android emulator and then
switch to Mac to run the same code on the iOS emulator. Very painful... but
running on Mac isn't an option.
…On Sun 27 Oct, 2019, 5:32 PM Dominik Roszkowski, ***@***.***> wrote:
I also encounter this problem on i7 MacBook Pro. Adding cloud_firestore
increased my build time to simulator from 1-2 minutes (60-120 sec) to more
than 7-10 minutes and release build on CI to over 15-20 minutes.
Sample output from deploying to simulator:
Launching lib/main_dev.dart on iPhone 11 in debug mode...
Xcode build done. 458,6s
This was not clean build but some changes to dart code have been made.
Previous clean build with pod install took over 600 sec.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#349>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADTXR46Q2UWD3AUFNUYOHJDQQVYLJANCNFSM4JAIAHWA>
.
|
Same here, I started considering buying new machine...but i see that thats not really the case. Any workaround ? is there any chance to include firestore as pre-compiled binary ? |
Here is my flutter doctor and pubspec if its useful, the same issue is happening to me. Very slow to build on iOS
|
Can confirm the super ugly build times with Firestore too. Sometimes getting like peak 230 seconds on a quite fast Macbook Pro. This is really barely usable at this point. Unfortunately we need Firestore. This was my latest build ├─Assembling Flutter resources... 4,5s |
adding @collinjackson for his thoughts on this issue |
I found this thread, and its source, having encountered the same problem -- ios build time dramatically escalated after adding cloud_firestore. I didn't clock it, but I know it was well over 10 minutes, perhaps bordering on 20. Is there anything I can do to assist, keeping in mind I know very little on objc/swift/pods ? Compounded with having to randomly create bridge files and adding/removing use_frameworks, neither of which do I understand when and why and what and just follow whatever google shows me, ios building is becoming frustrating. So, instead of being afraid to look at the code in fear it may break and never build again, what can I offer? |
@alevinetx @csells From what I observed, main problem is constant rebuilding. And those firebase libs are compiling huge amount of some C files. I have Core I7 8700, 32GB, NVME hackintosh which is really snappy...but with this, sometimes it takes minutes to build. On my macbook 15" pro late...its kind of impossible to develop, at is so frustrating |
Worst thing is that bitrise or codemagic can not be used with cloud_firestore, as it crosses the 20 minutes build time :( I tried many things but no significant improves. Every archive operation takes forever. |
@snadal @rdev-software @alevinetx maybe try to switch to dev channel for now, build times are a bit shorter there. I also couldn't stand so long build times and switched to Android device. |
Yeah dev channel is way better currently when it comes to build times. |
I also noticed my IPA is significantly larger, 16M -> ~50M, and I haven't changed the way I'm doing the build. I could assume a correlation, but I'm honestly lost right now. |
So bad that an uploading plugin takes around 35M 😅this really needs to be fixed. Getting build times up to 300 seconds on a 2018 Macbook Pro... |
Would just like to chime in and say that I think that in addition to it taking long time to build, it seems like something is broken with the caching as well. If I plug out my phone and then come back to my computer and run "Start debugging" in VS Code again it takes minutes for the "Running Xcode build" step to complete. It's really a productivity killer 😞 |
Yes for me too :( This is why I use the |
I can only use the attach command from VS Code when I'm working on my Add2App Flutter app, it doesn't work for the normal Flutter app I'm working on. Is there any trick to getting this working? |
Is that makes could be reconnected with vscode with the device? ➜ flutter-test git:(master) ✗ flutter attach |
@mzkai you think this is slow?? On my Mac it takes over 2000 seconds (yes, more than 30 minutes). Luckily there is hot load. But each time something goes wrong and I need to rebuild I have to go do other things while it compiles... |
Same issue on empty flutter project with |
man using firebase in flutter causes a lot more issues than i thought it would. |
Still having this issue, its nuts! |
300+ Seconds to Build for a Hello World app! |
I'm not sure what changed but all of a sudden my builds went from taking 300 seconds to anywhere between 40 seconds to 150 seconds. Not ideal, but way better than before. The only thing i changed was i removed the 'ios' folder and ran 'flutter create ios .' because there was a separate issue I was facing. If someone else wants to try this and see if they get the same result, maybe there's something here. |
Can you verify on your Xcode if you're using the new build system or the legacy build system? re-creating the iOS part would use the default settings and the build system is defaulted to new. However, before I've been experiencing issues using the new system but maybe something has changed now. |
I am planning to drop direct firebase integration on my app and instead use cloud functions, however, we're using semi-realtime-chat functionality and media uploads. These are hard to do with just cloud functions. I'm still hoping i could trim down the build time from 30-60 mins to 10mins and hoping too there are no issues with OneSignal and Firebase as I do have a ton of issues before when I use them together. |
It's using the new build system |
i'm using the stable channel |
Although this is not a solution to the problem, I can confirm that after
changing to a faster computer the build times went down significantly. I
hope this helps.
…On Tue, May 26, 2020 at 5:05 PM shahzad ***@***.***> wrote:
I'm not sure what changed but all of a sudden my builds went from taking
300 seconds to anywhere between 40 seconds to 150 seconds.
Not ideal, but way better than before. The only thing i changed was i
removed the 'ios' folder and ran 'flutter create ios .' because there was a
separate issue I was facing.
If someone else wants to try this and see if they get the same result,
maybe there's something here.
What is the Flutter channel that you used to run flutter create ios?
i'm using the stable channel
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA3NC7VNQ2YZ4PJX56W2ODRTQ4KDANCNFSM4JAIAHWA>
.
|
@shahzadc My build time went down to 40 seconds as well (from 300), but I have made 0 changes to my flutter environment or anything! |
This comment was buried (note these changes are now on all channels):
|
Still rubbish on v1.18.0-11.1.pre (beta) for me ... |
macOS and iOS builds need 20 - 30 Min. (MacBook Pro 2017) :( |
We're actively investigating this as part of #2582 - we're working on Firestore right now, so we'll get it sorted. |
Hey everyone, we have something for you to try that we hope will help (showing a 60-80% reduction in build times in some of our tests) ⚡ Please see the update issue I've created for this specifically to learn more: #2751 Lets discuss trying out the solution over there, thanks |
I appreciate that solution @Salakar - thank you! I wonder if there's also something going on with compilation caching, in general. Xcode doesn't usually rebuild the world every time anything changes for a Swift app, and React Native apps don't seem to rebuild Firebase every time either. The solution above may work for Firebase (at a third-party dependency cost), but I wonder if there's something else that can cache all parts of a build process instead? |
There could be potential issues with caching, but in the scope of FlutterFire/RNFirebase this isn't something we ourselves can address really. I spent several days looking into/debugging Xcode build performance for this issue and there was nothing left in the way of optimisation other than the pre-compiled frameworks unfortunately. There may very well be some underlying issue with the tooling that's aggressively clearing cache or something similar - something I didn't have a chance to look into, but even then it won't solve the first time build uncached slowness either. I'm going to go ahead and close this issue, it's been a few weeks now and there's not been any major push back against the posted solution above and it has also shown promising results for a lot of people 🎉 We can always discuss this further on #2751 if needed. Thank you everyone for participating |
@Salakar why was this closed? The Flutter/React native libs simply build this lib with a wrapper layer to connect to it; nothing special. This plugin is the main reason why we dislike Firestore and try to migrate away from it. Still, on our Flutter projects, it's extremely slow. Not only building but the pod install step now takes over 5 minutes for Why is it that the web version works perfectly well with a light JS library but the mobile versions (React Native, Flutter, Native) have this awful library? |
Flutter macOS is still effected by this issue. Should we create a new issue for Flutter macOS? |
I created a new issue for Flutter macOS XCode problem (#3185), because this issue only deals with iOS XCode problem (pls update, if you also use Flutter macOS and |
EDIT (@Salakar): See #2751 for a solution.
Summary of Issue
Simply adding
cloud_firestore
topubspec.yaml
results in a huge increase in iOS xcode build times. The issue can be recreate with nothing more than a simpleflutter create
application and minor changes topubspec.yaml
.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 topubspec.yaml
:Now we build the app:
Okay that looks reasonable.
With
cloud_firestore
Simply add the latest version of
cloud_firestore
plugin topubspec.yaml
(no other changes):Now we build the application again:
Yes... that is right. A six minute increase in iOS build times just from adding the
cloud_firestore
plugin topubspec.yaml
. Again, no changes were made to theflutter create
generated application, this is simply changes topubspec.yaml
.Logs
I did confirm that this issue persists on other
flutter
channels as well as other later versions ofcloud_firestore
plugin.The text was updated successfully, but these errors were encountered: