cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Grebnov (JIRA)" <>
Subject [jira] [Created] (CB-7060) WP8. Fix large project build performance issue
Date Wed, 02 Jul 2014 06:42:24 GMT
Sergey Grebnov created CB-7060:

             Summary: WP8. Fix large project build performance issue
                 Key: CB-7060
             Project: Apache Cordova
          Issue Type: Bug
          Components: WP8
            Reporter: Sergey Grebnov
            Assignee: Sergey Grebnov

When a Windows Phone project with many resources is built in VS with Cordova, the project
takes much longer to build than a project for Win 8 or Android. We have identified the function
that is causing the issue; it is the exec_verbose(command) function in <project-folder>\bld\Debug\platforms\wp8\cordova\lib\build.js

// executes a commmand in the shell

function exec_verbose(command) {

    //Log("Command: " + command);

    var oShell=wscript_shell.Exec(command);

    while (oShell.Status == 0) {

        //Wait a little bit so we're not super looping


        //Print any stdout output from the script

        if (!oShell.StdOut.AtEndOfStream) {

            var line = oShell.StdOut.ReadLine();




The WScript.sleep() call gets executed every time through the loop, and when building a Windows
Phone 8 project, every single resource that is added gets its own line in the log. Thus a
project with thousands of resources sleeps thousands of times. This function is identical
in the Win8 build.js file, but the resources aren’t added in the same way as they are for
Windows Phone projects. The Android build.js does something entirely different.

We have identified a couple potential fixes:
•Change the if statement to a while loop
•Leave the if statement but change the ReadLine() call to a ReadAll() call


This message was sent by Atlassian JIRA

View raw message