Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve high cpu usage on osx. #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,14 @@ App.prototype.start_meteor = function(done){
this.meteor_process = spawn(command, args, {
cwd: this.$.env.app.meteor,
env: env,
// ignore on windows and them pipe stdout and sterr bellow
// spawning meteor with stdio=inherit on windows breaks things silently,
// not good mr windows
stdio: this.$.env.os.is_windows ? 'pipe' : 'inherit'
// pipe stdout and stderr below, because spawning meteor with stdio=inherit will:
// 1. break things silently on windows.
// 2. result in cpu usage on osx.
stdio: 'pipe',
});

if(this.$.env.os.is_windows) {
this.meteor_process.stdout.pipe(process.stdout);
this.meteor_process.stderr.pipe(process.stderr);
}
this.meteor_process.stdout.pipe(process.stdout);
this.meteor_process.stderr.pipe(process.stderr);

var meteor_url = 'http://localhost:3000';
this.$.plugins.get('nodejs').meteor_ready(meteor_url, function(){
Expand Down Expand Up @@ -155,7 +153,7 @@ App.prototype.bundle_meteor = function( /* server_url, */ done) {
App.prototype.ensure_deps = function(done) {

this.log.info('ensuring electrify dependencies');

var npm_cmd = 'npm' + (this.$.env.os.is_windows ? '.cmd' : '');

// in development mode, use local electrify version
Expand Down