[ 
https://issues.apache.org/jira/browse/CB-7060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14049680#comment-14049680
 ] 

ASF GitHub Bot commented on CB-7060:
------------------------------------

GitHub user sgrebnov opened a pull request:

    https://github.com/apache/cordova-wp8/pull/43

    CB-7060 WP8. Fix large project build performance issue

    https://issues.apache.org/jira/browse/CB-7060

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-wp8 CB-7060

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-wp8/pull/43.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #43
    
----
commit dcbd56b2bb2971363ff0de790cb8857f9d80a0b6
Author: sgrebnov <[email protected]>
Date:   2014-07-02T07:00:53Z

    CB-7060 WP8. Fix large project build performance issue

----


> WP8. Fix large project build performance issue
> ----------------------------------------------
>
>                 Key: CB-7060
>                 URL: https://issues.apache.org/jira/browse/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
>         WScript.sleep(100);
>         //Print any stdout output from the script
>         if (!oShell.StdOut.AtEndOfStream) {
>             var line = oShell.StdOut.ReadLine();
>             Log(line);
>         }
>     }
> 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
(v6.2#6252)

Reply via email to