Restart renderer process instead of reloading.

Chromium has the bug that reloading would cause memory leaks, and V8's
GC would slow down everything, so restarting the renderer process when
the Atom is reloaded would make things much cleaner.
This commit is contained in:
Cheng Zhao
2013-05-28 16:07:53 +08:00
parent 30b67af51a
commit d4142db847
2 changed files with 2 additions and 3 deletions

View File

@@ -206,8 +206,7 @@ window.atom =
remote.getCurrentWindow().toggleDevTools()
reload: ->
# TODO Restart renderer process when needed
remote.getCurrentWindow().reloadIgnoringCache()
remote.getCurrentWindow().restart()
focus: ->
remote.getCurrentWindow().focus()

View File

@@ -132,7 +132,7 @@ class AtomApplication
viewMenu =
label: 'View'
submenu:[
{ label: 'Reload', accelerator: 'Command+R', click: => BrowserWindow.getFocusedWindow()?.reloadIgnoringCache() }
{ label: 'Reload', accelerator: 'Command+R', click: => BrowserWindow.getFocusedWindow()?.restart() }
{ label: 'Toggle DevTools', accelerator: 'Alt+Command+I', click: => BrowserWindow.getFocusedWindow()?.toggleDevTools() }
]