Skip to content

Quite slow incremental build performance #16937

Closed

Description

@romain10009

Bug Report

Ionic version:

[x] 4.x

Current behavior:
Curently it takes about 3-7 seconds (depending on CPU) to see the updated code after you edit one line in an ionic serve. I have a xps15 with a i7 8750H and CPU is fully available to webpack. I guess it is also a big draw on the battery for our mobile fellow devs.

image

Expected behavior:
As a developer, it is important to see as close to instant feedback ideally of how stuff looks like, would make the Ionic developer experience much better / be a big + for the project. Not too sure if Ionic can improve the webpack process or if we need to wait for angular to use bazel for instance.

Steps to reproduce:
Just follow the ionic beta documentation, setup an ionic 4.x.x project with the following command :

ionic start myApp tabs --type=angular
cd ./myApp
ionic serve

Other information:

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.6.0 (C:\Users\romai\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.0-rc.0
   @angular-devkit/build-angular : 0.10.7
   @angular-devkit/schematics    : 0.7.5
   @angular/cli                  : 7.2.0-beta.2
   @ionic/angular-toolkit        : 1.2.2 (C:\Users\romai\ideaProjects\gitalye\node_modules\@ionic\angular-toolkit)

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.0.1, (and 6 other plugins)

System:

   NodeJS : v11.6.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.5.0
   OS     : Windows 10

Activity

  1. paulstelzer commented on Jan 2, 2019

    @paulstelzer
    Contributor

    I can confirm. I need (for a small-medium-sized project) 9 to 16 seconds to serve changes if Ionic is integrated. But I think Angular can be optimized, too

  2. romain10009 commented on Jan 2, 2019

    @romain10009
    Author

    I can confirm. I need (for a small-medium-sized project) 9 to 16 seconds to build with Ionic. But I think Angular can be optimized, too

    I meant incremental build, the one that happens when you run ionic serve, and you change a line, I clarified my first post.

  3. paulstelzer commented on Jan 2, 2019

    @paulstelzer
    Contributor

    I mean that, too ;) The initial build takes longer for me ;) Edited my comment, too ;)

  4. godenji commented on Jan 3, 2019

    @godenji

    I work on the backend in Scala, which has a notoriously slow compiler; Ionic + Angular + Webpack is dog slow in comparison, impressive :)

    If you look at, for example, BuckleScript + ReasonML, where a clean build of the entire project is often under 1 second, you have to wonder what's gone off the rails with the frontend ecosystem at large, where trivial changes cause incremental builds > 10 seconds.

    To be fair, Ionic + Angular does everything (js, css, markup), so there's more work to do -- would be nice to trim down incremental builds to the 2-3 second range in order to keep development flow smooth.

  5. romain10009 commented on Jan 3, 2019

    @romain10009
    Author

    What I meant is not 4 seconds for a simple change, but less than 300-500 ms would be a juicy target.

  6. paulstelzer commented on Jan 3, 2019

    @paulstelzer
    Contributor

    Yeah, but this is not the task of Ionic, this is a task for Angular ;)

  7. brandyscarney commented on Jan 3, 2019

    @brandyscarney
    Member

    Thanks for the issue! ionic serve runs ng serve directly which is an Angular command.

    As of Ionic 4, Ionic no longer ships with custom Angular build tools. This means any build issues you experience should be considered Angular build issues and should be brought up with the Angular team.

    I'm going to close this as I do not think it is an Ionic issue. Thanks!

  8. romain10009 commented on Jan 3, 2019

    @romain10009
    Author

    @brandyscarney It seems we need to keep track of this : angular/angular#19058 They have now a ng add to bazelify a build process.

  9. ionitron-bot commented on Feb 2, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  10. locked and limited conversation to collaborators on Feb 2, 2019
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

    package: angular

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions