From ed46583226878e7e5b62d94a0a62c684fa5bb172 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 11 May 2016 22:25:36 +0200 Subject: [PATCH] Perf: Send 'ipcReady' as soon as possible This slightly improves app startup time --- renderer/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renderer/index.js b/renderer/index.js index 53f4a256..5272b9fd 100644 --- a/renderer/index.js +++ b/renderer/index.js @@ -45,6 +45,9 @@ var vdomLoop // Not global JS exceptions, not like Rollbar, handles segfaults/core dumps only crashReporter.init() +// Listen for messages from the main process +setupIpc() + // All state lives in state.js. `state.saved` is read from and written to a file. // All other state is ephemeral. First we load state.saved then initialize the app. loadState(init) @@ -94,9 +97,6 @@ function init () { window.addEventListener('focus', onFocus) window.addEventListener('blur', onBlur) - // Listen for messages from the main process - setupIpc() - // Done! Ideally we want to get here <100ms after the user clicks the app sound.play('STARTUP')