[
https://issues.apache.org/jira/browse/CB-7060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Grebnov resolved CB-7060.
--------------------------------
Resolution: Fixed
> 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)