cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimir-kotikov <...@git.apache.org>
Subject [GitHub] cordova-lib pull request: CB-9297 Parse xcode project syncronously...
Date Fri, 11 Sep 2015 14:05:57 GMT
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.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message