Perf: Send 'ipcReady' as soon as possible
This slightly improves app startup time
This commit is contained in:
@@ -45,6 +45,9 @@ var vdomLoop
|
|||||||
// Not global JS exceptions, not like Rollbar, handles segfaults/core dumps only
|
// Not global JS exceptions, not like Rollbar, handles segfaults/core dumps only
|
||||||
crashReporter.init()
|
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 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.
|
// All other state is ephemeral. First we load state.saved then initialize the app.
|
||||||
loadState(init)
|
loadState(init)
|
||||||
@@ -94,9 +97,6 @@ function init () {
|
|||||||
window.addEventListener('focus', onFocus)
|
window.addEventListener('focus', onFocus)
|
||||||
window.addEventListener('blur', onBlur)
|
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
|
// Done! Ideally we want to get here <100ms after the user clicks the app
|
||||||
sound.play('STARTUP')
|
sound.play('STARTUP')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user