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

This commit is contained in:
Johannes Rieken
2017-05-04 17:12:47 +02:00
parent a34e5de6ff
commit 174fafae53
2 changed files with 20 additions and 9 deletions
+13 -1
View File
@@ -199,4 +199,16 @@ function main() {
}).done(null, err => instantiationService.invokeFunction(quit, err));
}
main();
// 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();
});
}