Giter Site home page Giter Site logo

Comments (6)

breautek avatar breautek commented on May 27, 2024

But now i am seeing its thousands of useless terminal messages just soaking up buffer.

What I believe you're seeing is the stdout underlying tool xcodebuild (maybe confirm?), which is quite spammy. I'm not too familiar with this repo but what we could probably unhook the stdout pipe to avoid it's stdout from going to the console (since we spawn it, I assume) and only pipe the stdout our verbose flag is enabled. But if a compilation error should occur, the feedback information will be lost (and quite often the real error causing the compilation can be pages up in the stdout from when the process exits) and you'll be required to rerun the build with --verbose.

I don't have access to a mac machine, but xcodebuild does have a -quiet flag, which supposedly hides all stdout except for warnings and errors. That sounds like the best path forward imo, and we can omit the flag if our --verbose flag is enabled.

from cordova-cli.

rolinger avatar rolinger commented on May 27, 2024

Thanks. quite spammy is a bit of an understatement. lol.

Is there no way to pass that flag from the existing cordova cli? Or at least temporarily turn it off in the background before running cordova build ios? With almost 6 minute build times I am really hoping disabling verbose or turning on -quiet will greatly speed up my build compiles.

It was about 1 minute (which was tolerable) with Cordova 10, and except for two or three plugin updates, my app is identical on @11 as it was on @10, but now it is a quite painful process.

from cordova-cli.

breautek avatar breautek commented on May 27, 2024

For the time being, you can try utilising Build Flag to pass the -quiet flag through...

cordova build ios --buildFlag="-quiet"

I believe this gets passed to the xcodebuild command.

If you use the build.json file, you might be able to add it there as well...

from cordova-cli.

rolinger avatar rolinger commented on May 27, 2024

I did a few test and found something interesting:

`ionic cordova build ios --buildFlag="-quiet"` - 
   -quiet is ignored, there is no xcodeBuildArg displayed in the terminal
   - and all the verbose info is sent to console, overflowed with over 30,000 lines
   - takes nearly 6 minutes to complete
`cordova build ios --buildFlag="-quiet" 
  - I see : Adding xcodebuildArg: [ '-quiet'] in the terminal
  - And it works, it quiets the noise down...ALOT...but still over 1000 lines
  - And unfortunately, it did not reduce the build time, this one was longer at 6min 30 seconds

So even if you implemented a fix for the Cordova CLI that somehow invokes or interpets the -quiet flag, I am not certain Ionic will honor it. I am going to file a bug with Ionic-CLI now.

Regardless of verbose output or not, the build process is painfully, and consistently, slow - taking 6+ minutes on every build. What changed that caused a 500% in build time? Is everyone seeing this, or am I just special?

from cordova-cli.

breautek avatar breautek commented on May 27, 2024

Regardless of verbose output or not, the build process is painfully, and consistently, slow - taking 6+ minutes on every build. What changed that caused a 500% in build time? Is everyone seeing this, or am I just special?

I can't really answer this, but I can say that cordova-ios hasn't had any significant changes in awhile (6.2.0 was released ~Feburary 2021). It was built originally for XCode 11 support. There hasn't been any changes in all the XCode versions since that warranted an update to cordova-ios.

I can also say that an i3/8gb machine isn't really a workstation. How is your memory pressure? Are you sure you're not using swap? If you're memory pressure is high and is heavily using your swapfile, everything is going to run sluggish since it's effectively using your hard drive as ram which will be incredibly slow. Compiling, and more specifically the linking step is generally pretty resource hungry task. If you're consuming 6gb/8gb before you even start the build process, you'll likely going to be swapping ram a lot.

from cordova-cli.

rolinger avatar rolinger commented on May 27, 2024

@breautek - I just upgraded my Mac Mini from 8gb to 64Gb. One of the modules is bad so its only 32Gb at the moment. However, even with 32Gb of RAM the ionic cordova build ios still takes a full 6 minutes. Zero improvement over 8Gb of RAM. I doubt when I get the full 64Gb installed that there will be any difference. Cordova 11 is just a hog....the same Mac mini with 8gb RAM on Cordova 10 only took about 2minutes to build. Its 3 times longer now...even with 4x the memory.

from cordova-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.