Revert "load main.js while waiting for app.isReady, #17108"

This reverts commit 174fafae53.
This commit is contained in:
Johannes Rieken 2017-06-09 10:34:35 +02:00
parent 593efb9b89
commit 3e81316eab
2 changed files with 9 additions and 20 deletions

View file

@ -227,12 +227,13 @@ var nodeCachedDataDir = getNodeCachedDataDir().then(function (value) {
}
});
var nlsConfig = getNLSConfiguration();
process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig);
// Load our code once ready
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 () {
bootstrap.bootstrap('vs/code/electron-main/main');
}, function (err) {
console.error(err);
nodeCachedDataDir.then(function () {
require('./bootstrap-amd').bootstrap('vs/code/electron-main/main');
}, console.error);
});

View file

@ -201,16 +201,4 @@ function main() {
}).done(null, err => instantiationService.invokeFunction(quit, err));
}
// Get going once we are ready
// 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();
});
}
main();