This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245647 - Cordova build takes up to 20 minutes
Summary: Cordova build takes up to 20 minutes
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Cordova (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-14 13:53 UTC by iluvtr
Modified: 2014-07-17 02:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description iluvtr 2014-07-14 13:53:38 UTC
Cordova build is awfully slow, in my machine Intel i3 3GB RAM, takes up to 20 minutes. This doesn't get improved in new builds: the build time is the same. Seems like it gets downloading 'plugins' or something like that, but that time is just unacceptable.
Comment 1 Vladimir Riha 2014-07-14 19:57:29 UTC
Could you please attach content of the output tab that contains all the build information.?

I think this will be problem with Cordova. You can go to project properties of you project, switch to Cordova category and configure which plugins should be used (by default there are all core plugins). I think that Cordova clones each plugin's repositoty and that could take time.
Comment 2 iluvtr 2014-07-16 02:54:52 UTC
I checked well the problem and the cause is: When I try to build a Cordova project NB has a task to update the plugins, so each time I run or build Cordova it takes really, really longer. Combined with an slow Internet connection it gets horrible longer. 

The workaround to this is edit the build.xml file, search for a target called update-plugins and comment the content like this:
    <target name="update-plugins">
        <!--<plugintask/>-->
    </target>    


With this simple change now the build time is aceptable, However I suggest that this process (update-plugins) should be DISABLED by default, you can put a checkbox in the Project Configuration for Enable / Disable.

Hope you attend my suggestion, please note that slow things scare developers
Comment 3 Jan Becicka 2014-07-16 07:51:39 UTC
This issue was introduce with cordova 3.5.0. It did not happen with cordova 3.4.1.
Comment 4 Jan Becicka 2014-07-16 07:52:16 UTC
Changeset: 8e8ad8d81132
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2014-07-16 09:49
Message:
Comment 5 iluvtr 2014-07-16 12:30:46 UTC
Jan consider that it is not the fault of Cordova, because it's Netbeans who has that Ant Target to update the plugins, Cordova has nothing to do with that.

I consider that update the plugins each time you run or build the Project is REALLY inefficient, How about a button or a menu called 'Update plugins'? I think that is more appropriate than the actual behaviour. 
Anyway that Ant target update-plugins should be DISABLED by default
Comment 6 Jan Becicka 2014-07-16 12:37:55 UTC
I fixed the bug. Plugins are not updated any more.
Comment 7 Quality Engineering 2014-07-17 02:19:16 UTC
Integrated into 'main-silver', will be available in build *201407170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8e8ad8d81132
User: Jan Becicka <jbecicka@netbeans.org>
Log: Issue #245647 - Cordova build takes up to 20 minutes