Ionic-cli: ionic 4.2.0 introduced super delay for compile

Created on 23 Oct 2018  路  14Comments  路  Source: ionic-team/ionic-cli

Description:

ionic 4.2.0 introduced karma.
Because of this, ionic cordova run browser takes longer time.

Steps to Reproduce:

https://github.com/wf9a5m75/ionic_v4.1.2-v4.2.0

Output:

v4.1.2

$> date && ionic cordova run browser
Mon Oct 22 18:54:24 PDT 2018  <---start
> ionic-app-scripts build --target cordova --platform browser
[18:54:28]  ionic-app-scripts 3.2.0
[18:54:28]  build dev started ...
...
^C[ERROR] Non-zero exit from subprocess.
$> date
Mon Oct 22 18:54:57 PDT 2018  <---end

v4.2.0

$> date && ionic cordova run browser
Mon Oct 22 19:01:02 PDT 2018  <---start
> ng run app:ionic-cordova-build --platform=browser

Date: 2018-10-23T02:02:38.675Z
Hash: 8bf8b03adeca0bf9241d
Time: 89442ms

masashi-macgms:v4.2.0 masashi$ date
Mon Oct 22 19:02:45 PDT 2018  <---end

Please improve the startup speed or provide --no-karma option.

triage

Most helpful comment

Yeah, Node 10 has been greatly reducing build times for people. I would recommend Node 10 in general. It will be in LTS in a few days.

All 14 comments

@wf9a5m75 You're comparing a v3 build to a v4 build. It's running completely different commands:

ionic-app-scripts build --target cordova --platform browser

vs

ng run app:ionic-cordova-build --platform=browser

I answered Try Ionic 4? (y/N) y for both.
Do you mean ionic v4.1.2 generates ionic v3?

Mon Oct 22 19:01:02 PDT 2018 <---start
Mon Oct 22 19:02:45 PDT 2018 <---end

Anyway, taking almost 2 minutes is too much slow.
This is really bad affect for plugin development.

If you doubt me, I can give you screen video on youtube.

Here is the evidence.
https://youtu.be/Cb6CAA5at5w

Even if you don't reopen this issue, I will create a new ticket.

The slow build time is due to many factors: computer power, node version, app size, etc. We no longer maintain the build tooling for v4 apps, like in v3. It uses the Angular CLI directly.

Umm. If I run ionic v4 on MacPro 2017 (16GB Memory), node v9, it's still takes 90 seconds.
As you can see, app size is very small, because it's empty project.

I believe your environment is faster than me.
Could you tell me the environment, such as you said, computer power, node version, and etc?

As far as I remember, ionic v4.0.x were really faster.

I found one interested issue https://github.com/ionic-team/ionic/issues/15508.
Regarding of the thread, they says "node v10" solve the problem. Ok, let's try.

Yeah, Node 10 has been greatly reducing build times for people. I would recommend Node 10 in general. It will be in LTS in a few days.

I confirmed node v10 solves this problem! It becomes really faster!

Thank you for your taking time! I hear the same issue from other people actually, and I will tell them.

will my ionic 3 based on node 8 continue to work fine when i go to node 10?

Was this page helpful?
0 / 5 - 0 ratings