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

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

Github user vladimir-kotikov commented on the pull request:

    https://github.com/apache/cordova-lib/pull/305#issuecomment-139556202
  
    The `xcode`'s `parse` method uses `child_process.fork` API to run parser in 
a separate worker process, which then reports parsing result to parent process 
via `child_process.send`. However `send` became async in node v4 so this 
communication doesn't work properly now.
    
    Although, `parseSync` method is even more efficient (at least for small 
project) since it doesn't creates a a new instance of node process. From 
official `child_process` docs:
    > These child Node.js processes are still whole new instances of V8. Assume 
at least 30ms startup and 10mb memory for each new Node.js. That is, you cannot 
create many thousands of them.
    
    Also compare execution time for tests from 
https://github.com/MSOpenTech/cordova-lib/commit/81eef5f7d0ee46a88c2a6836fd87c6c1c1ab216d:
 ~0.9 seconds for this branch (sync parsing) and ~2.7 second if applied to 
current master (async). The difference IMO is caused by cost of spawning node 
processes.



> Cordova CLI fails silently with iojs
> ------------------------------------
>
>                 Key: CB-9297
>                 URL: https://issues.apache.org/jira/browse/CB-9297
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 5.1.2
>         Environment: Cordova CLI: 5.1.1 (this isn't in your version list 
> above)
> ios-deploy version: 1.7.0 
> ios-sim version: 4.1.1 
> OS: Mac OS X Yosemite
> Xcode version: Xcode 6.4 Build version 6E35b 
> node (iojs): 1.8.1
>            Reporter: Robert Churchill
>            Assignee: Vladimir Kotikov
>            Priority: Critical
>              Labels: cordova-ios-4.0.x
>
> Running most build tasks (emulate, run, build) for ios when node is replaced 
> by iojs results in the build failing silently. Example:
> $ cordova build ios
> $
> $ cordova build ios --verbose
> Generating config.xml from defaults for platform "ios"
> Calling plugman.prepare for platform "ios"
> Preparing ios project
> ...
> [seems to finish prepare (but without executing hooks) then exits]
> ...
> $
> Not sure if you plan to support iojs, but at least this report might help 
> someone googling. Unfamiliar with the Apache JIRA system so apologies if this 
> report is in the wrong place etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to