Faster startup time (50ms)

This commit is contained in:
Feross Aboukhadijeh
2016-04-07 00:58:37 -07:00
parent 1947a03e94
commit d49a8e772f
3 changed files with 8 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
# WebTorrent Desktop Version History # WebTorrent Desktop Version History
## UNRELEASED ## v0.3.2 - 2016-04-07
### Added ### Added
@@ -8,7 +8,10 @@
### Changed ### Changed
- Faster startup time (50ms)
- Update Electron to 0.37.5 - Update Electron to 0.37.5
- Remove the white flash when loading pages and resizing the window
- Fix crash when sending IPC messages
### Fixed ### Fixed

View File

@@ -20,10 +20,8 @@ function init () {
ipcMain.on('ipcReady', function (e) { ipcMain.on('ipcReady', function (e) {
app.ipcReady = true app.ipcReady = true
app.emit('ipcReady') app.emit('ipcReady')
setTimeout(function () { windows.main.show()
windows.main.show() console.timeEnd('init')
try { console.timeEnd('init') } catch (err) {}
}, 50)
}) })
var messageQueueMainToWebTorrent = [] var messageQueueMainToWebTorrent = []

View File

@@ -49,7 +49,7 @@ function createAboutWindow () {
function createWebTorrentHiddenWindow () { function createWebTorrentHiddenWindow () {
var win = windows.webtorrent = new electron.BrowserWindow({ var win = windows.webtorrent = new electron.BrowserWindow({
backgroundColor: '#282828', backgroundColor: '#1E1E1E',
show: false, show: false,
center: true, center: true,
title: 'webtorrent-hidden-window', title: 'webtorrent-hidden-window',
@@ -79,7 +79,7 @@ function createMainWindow () {
return focusWindow(windows.main) return focusWindow(windows.main)
} }
var win = windows.main = new electron.BrowserWindow({ var win = windows.main = new electron.BrowserWindow({
backgroundColor: '#282828', backgroundColor: '#1E1E1E',
darkTheme: true, // Forces dark theme (GTK+3) darkTheme: true, // Forces dark theme (GTK+3)
icon: config.APP_ICON + '.png', icon: config.APP_ICON + '.png',
minWidth: 425, minWidth: 425,