Revert "load main.js while waiting for app.isReady, #17108"
This reverts commit 174fafae53
.
This commit is contained in:
parent
593efb9b89
commit
3e81316eab
15
src/main.js
15
src/main.js
|
@ -227,12 +227,13 @@ var nodeCachedDataDir = getNodeCachedDataDir().then(function (value) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var nlsConfig = getNLSConfiguration();
|
// Load our code once ready
|
||||||
process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig);
|
app.once('ready', function () {
|
||||||
|
global.perfAppReady = Date.now();
|
||||||
|
var nlsConfig = getNLSConfiguration();
|
||||||
|
process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig);
|
||||||
|
|
||||||
var bootstrap = require('./bootstrap-amd');
|
nodeCachedDataDir.then(function () {
|
||||||
nodeCachedDataDir.then(function () {
|
require('./bootstrap-amd').bootstrap('vs/code/electron-main/main');
|
||||||
bootstrap.bootstrap('vs/code/electron-main/main');
|
}, console.error);
|
||||||
}, function (err) {
|
|
||||||
console.error(err);
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -201,16 +201,4 @@ function main() {
|
||||||
}).done(null, err => instantiationService.invokeFunction(quit, err));
|
}).done(null, err => instantiationService.invokeFunction(quit, err));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get going once we are ready
|
main();
|
||||||
// TODO@Joh,Joao there more more potential here
|
|
||||||
// we should check for other instances etc while
|
|
||||||
// waiting for getting ready
|
|
||||||
if (app.isReady()) {
|
|
||||||
global.perfAppReady = Date.now();
|
|
||||||
main();
|
|
||||||
} else {
|
|
||||||
app.once('ready', () => {
|
|
||||||
global.perfAppReady = Date.now();
|
|
||||||
main();
|
|
||||||
});
|
|
||||||
}
|
|
Loading…
Reference in a new issue